v2.13.3 #45
Workflow file for this run
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: Release | |
on: | |
release: | |
branches: [main] | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to update to' | |
default: 'v2' | |
required: true | |
ref: | |
description: 'which branch to update the tag on' | |
default: 'main' | |
required: true | |
jobs: | |
re-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ inputs.ref }} | |
- name: Config git name and email | |
run: | | |
git config user.name 'github-actions' | |
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | |
- name: Update tag with parameter | |
if: github.event.inputs.tag != '' | |
run: | | |
git tag --delete ${{ inputs.tag }} || true | |
git push --delete origin ${{ inputs.tag }} || true | |
git tag -a ${{ inputs.tag }} -m 'Retag ${{ inputs.tag }}' | |
git push origin ${{ inputs.tag }} | |
- name: Update tag to v2 | |
if: github.event.inputs.tag == '' | |
run: | | |
git tag --delete v2 || true | |
git push --delete origin v2 || true | |
git tag -a v2 -m 'Retag v2' | |
git push origin v2 |