ttt_menace 1.0.0-alpha.5

Tic Tac Toe game with a Menace AI
on:
  workflow_call:
    outputs:
      new_version:
        description: 'The new version to release'
        value: ${{ jobs.semantic.outputs.new_release_version }}
      new_release_published:
        description: 'Whether a new release was published'
        value: ${{ jobs.semantic.outputs.new_release_published }}

name: Semantic Release

env:
  RUST_BACKTRACE: 1
  SEMREL_RUST_VERSION: 1.0.0-alpha.8


jobs:
    release:
        name: Semantic Release
        runs-on: ubuntu-latest
        steps:
          - name: Checkout
            uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b
            with:
                fetch-depth: 0
                persist-credentials: false

          - name: Install Python
            uses: actions/setup-python@5ccb29d8773c3f3f653e1705f474dfaa8a06a912
            with:
              python-version: '3.10'

          - name: install commitizen
            run: pip install -U commitizen

          - name: Install Rust Stable
            uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f
            with:
                profile: minimal
                toolchain: stable
                override: true

          # The release build is used in the Semantic Release step
          - name: Build
            uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b
            with:
                command: build
                args: --release

          - name: Install Semantic Release Rust
            run: cargo install semantic-release-rust --version ${{ env.SEMREL_RUST_VERSION }}

          - name: Semantic Release
            uses: cycjimmy/semantic-release-action@8f6ceb9d5aae5578b1dcda6af00008235204e7fa
            id: semantic
            with:
                semantic_version: 19
                extra_plugins: |
                    @semantic-release/exec@6
                    @semantic-release/git@10
            env:
                GITHUB_TOKEN: ${{ secrets.ACTIONS_PAT_GITHUB }}
                CARGO_REGISTRY_TOKEN: ${{ secrets.SEMREL_CRATES_IO }}