Skip to content

Publish Tag

Publish Tag #3

Workflow file for this run

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 }}"