From 78490f7c08146c037e414aec95c9a22364f70590 Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Wed, 14 May 2025 03:49:44 +0300 Subject: [PATCH] ci: create tags from Crate version --- .github/workflow/tag.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflow/tag.yml diff --git a/.github/workflow/tag.yml b/.github/workflow/tag.yml new file mode 100644 index 0000000..23c3b3a --- /dev/null +++ b/.github/workflow/tag.yml @@ -0,0 +1,31 @@ +name: Create Tag from Crate Version + +concurrency: tag + +on: + workflow_dispatch: + push: + branches: [ "main" ] + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - uses: cachix/install-nix-action@master + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Checkout + uses: actions/checkout@v4 + + - name: Read Version + run: | + echo -n "version=v" >> "$GITHUB_ENV" + nix run nixpkgs#fq -- -r ".package.version" Cargo.toml >> "$GITHUB_ENV" + cat "$GITHUB_ENV" + + - name: Create Tag + run: | + set -x + git tag $version + git push --tags || :