From 32ee43b2ad78caebd27395bae0a788c422e7f142 Mon Sep 17 00:00:00 2001 From: GrantBirki Date: Fri, 1 Dec 2023 12:58:08 -0700 Subject: [PATCH] add 'Update Latest Release Tag' job --- .../workflows/update-latest-release-tag.yml | 36 +++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/update-latest-release-tag.yml diff --git a/.github/workflows/update-latest-release-tag.yml b/.github/workflows/update-latest-release-tag.yml new file mode 100644 index 0000000..05871b9 --- /dev/null +++ b/.github/workflows/update-latest-release-tag.yml @@ -0,0 +1,36 @@ +name: Update Latest Release Tag +run-name: Update ${{ github.event.inputs.major_version_tag }} with ${{ github.event.inputs.source_tag }} + +on: + workflow_dispatch: + inputs: + source_tag: + description: 'The tag or reference to use as the source (example: v8.0.0)' + required: true + default: vX.X.X + major_version_tag: + description: 'The major release tag to update with the source (example: v8)' + required: true + default: vX + +permissions: + contents: write + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: git config + run: | + git config user.name github-actions + git config user.email github-actions@github.com + + - name: tag new target + run: git tag -f ${{ github.event.inputs.major_version_tag }} ${{ github.event.inputs.source_tag }} + + - name: push new tag + run: git push origin ${{ github.event.inputs.major_version_tag }} --force