haply 1.2.0

Haply Robotics Client Library for the Inverse Service
Documentation
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

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
  # You can override MegaLinter flavor used to have faster performances
  # More info at https://megalinter.io/flavors/
  image: oxsecurity/megalinter-rust:v8
  script: ["true"] # if script: ["true"] doesn't work, you may try ->  script: [ "/bin/bash /entrypoint.sh" ]
  variables:
    # All available variables are described in documentation
    # https://megalinter.io/configuration/
    DEFAULT_WORKSPACE: $CI_PROJECT_DIR
    # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY
  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