v0.5.1 #25
Workflow file for this run
This file contains hidden or 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: Main | |
on: | |
release: | |
branches: [main] | |
types: [published] | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'which tag to update to' | |
default: 'v1' | |
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 v1 | |
if: github.event.inputs.tag == '' | |
run: | | |
git tag --delete v1 || true | |
git push --delete origin v1 || true | |
git tag -a v1 -m 'Retag v1' | |
git push origin v1 |