Publish Tag #3
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: Publish Tag | |
on: | |
workflow_run: | |
workflows: [Test] | |
types: [completed] | |
branches: [main] | |
jobs: | |
tag: | |
name: Publish Tag | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: "Refresh tags" | |
id: refresh-tag | |
run: git fetch --tags --force | |
- id: set_var | |
name: Get Version | |
run: echo ::set-output name=version::$(node -p "require('./package.json').version") | |
- name: Push Tag | |
id: tag | |
uses: anothrNick/github-tag-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
CUSTOM_TAG: "v${{ steps.set_var.outputs.version }}" | |