Tag #32
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_run: | |
workflows: ["CI"] | |
branches: [main] | |
types: | |
- completed | |
jobs: | |
extract-crate-version: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version' | |
- name: Export Crate Package Version | |
run: echo "PACKAGEV=$(cargo metadata --format-version=1 --no-deps | jq -r '.packages[0].version')" >> $GITHUB_OUTPUT | |
id: export_crate_version | |
outputs: | |
PACKAGEV: ${{ steps.export_crate_version.outputs.PACKAGEV }} | |
tag: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
timeout-minutes: 20 | |
needs: [extract-crate-version] | |
env: | |
PACKAGEV: ${{ needs.extract-crate-version.outputs.PACKAGEV }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Bump version and push tag | |
uses: anothrNick/github-tag-action@master | |
env: | |
CUSTOM_TAG: v${{ env.PACKAGEV }} | |
DEFAULT_BUMP: patch | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
REPO_OWNER: refcell | |
WITH_V: true |