stages:
- build
- release
- test
variables:
GIT_SUBMODULE_STRATEGY: recursive
build:
image: registry.gitlab.com/haply/internal/docker-images/win-tauri-amd64:latest
stage: build
tags:
- WindowsDocker
script:
- cargo build --all-targets --all-features
artifacts:
paths:
- target/debug/
- target/release/
- target/doc/
expire_in: 1 week
release:
image: registry.gitlab.com/haply/internal/docker-images/win-tauri-amd64:latest
stage: release
tags:
- WindowsDocker
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: on_success
before_script:
- npm install -g semantic-release semantic-release-cargo @semantic-release/git @semantic-release/changelog @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/gitlab
variables:
GITLAB_TOKEN: $GITLAB_API_ACCESS_TOKEN
GIT_FETCH_EXTRA_FLAGS: "--tags --force"
script:
- npx semantic-release
mega-linter:
stage: test
needs: []
allow_failure: true
image: oxsecurity/megalinter-rust:v8
script: ["true"] variables:
DEFAULT_WORKSPACE: $CI_PROJECT_DIR
artifacts:
when: always
paths:
- megalinter-reports
expire_in: 1 week
clippy_check:
stage: test
needs: []
allow_failure: true
image: registry.gitlab.com/haply/internal/docker-images/win-tauri-amd64:latest
script:
- rustup component add clippy
- cargo clippy --all-targets --all-features