Fix tagging (#108)

This MR fixes the tagging logic in our pipeline to automatically set a #patch value for the tag type.
This commit is contained in:
Harrison (Harry) Cramer
2023-11-18 16:42:39 -05:00
committed by GitHub
parent 8a9f8dfc88
commit 3b52f7177a

View File

@@ -1,40 +1,24 @@
name: Tag + Bump Version name: Tag + Bump version
on: on:
push: pull_request:
branches: branches:
- main - main
jobs: jobs:
build_tags: build:
runs-on: ubuntu-latest if: github.event.pull_request.merged == true
runs-on: ubuntu-22.04
permissions: permissions:
contents: write contents: write
steps: steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Run action
id: taggerDryRun
uses: anothrNick/github-tag-action@1.64.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
DRY_RUN: true
- name: Echo new tag
run: |
echo "The next tag version will be: ${{ steps.taggerDryRun.outputs.new_tag }}"
- name: Echo change version type
run: |
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
# BUILD HERE, WILL ONLY EXECUTE IF PREVIOUS STEPS SUCCEEDED
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.merge_commit_sha }} ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0' fetch-depth: '0'
- name: Bump version and push tag - name: Bump version and push tag
uses: anothrNick/github-tag-action@1.64.0 uses: anothrNick/github-tag-action@1.64.0
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: patch DEFAULT_BUMP: patch
WITH_V: true GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRERELEASE: false PRERELEASE: false
WITH_V: true