From 12a1c8f0f5f886bb2c3088e32ca1c7563b06d5b0 Mon Sep 17 00:00:00 2001 From: Zozman Date: Tue, 3 Jan 2023 16:26:06 -0800 Subject: [PATCH] Added version tagging for master commits --- .github/workflows/tag-release.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/tag-release.yaml diff --git a/.github/workflows/tag-release.yaml b/.github/workflows/tag-release.yaml new file mode 100644 index 0000000..9b7a0d8 --- /dev/null +++ b/.github/workflows/tag-release.yaml @@ -0,0 +1,30 @@ +name: tag-release +on: + push: + # Tag a release upon pushing code to the master branch + branches: + - master +jobs: + tag: + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@v3 + with: + fetch-depth: '0' + + - name: Get Short SHA Of Last Commit + id: short + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + + - name: Bump Version And Push Tag + uses: anothrNick/github-tag-action@1.56.0 + id: tag + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + DEFAULT_BUMP: patch + INITIAL_VERSION: 1.0.0 + WITH_V: true + + - name: Print Results + run: echo "Tagged Commit ${{ steps.short.outputs.sha_short }} With Tag ${{ steps.tag.outputs.tag }}"