Tag #590
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tag | |
on: | |
workflow_dispatch: | |
# inputs: | |
# type: | |
# description: "The type of run staging/production" | |
# default: "staging" | |
# type: "string" | |
# required: true | |
#on: | |
# push: | |
# branches: | |
# - "release" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
#env: | |
# SCCACHE_GHA_ENABLED: "true" | |
# RUSTC_WRAPPER: "sccache" | |
jobs: | |
create-tag: | |
name: "Create tag" | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{ vars.RUSTC_VERSION }} | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
key: tag | |
cache-all-crates: true | |
# - name: Sccache Action | |
# uses: Mozilla-Actions/sccache-action@v0.0.5 | |
- name: "Get tag" | |
id: "get-tag" | |
shell: "bash" | |
run: | | |
echo PKG_VERSION=$(grep -m 1 '^version' Cargo.toml | sed -e 's/^version\s*=\s*//' | sed -e 's/"//g') >> $GITHUB_OUTPUT | |
- name: "Set Tag" | |
shell: "bash" | |
run: | | |
git tag v${{ steps.get-tag.outputs.PKG_VERSION }} && git push --tags | |
# https://codingpackets.com/blog/rust-binary-and-docker-releases-using-github-actions/ |