-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Automaticlly retag for the new release #92 * Fix running failure issue
- Loading branch information
1 parent
92298bd
commit 8e8e8f7
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ inputs.ref }} | ||
- name: update tag | ||
run: | | ||
git config user.name 'github-actions' | ||
git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
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 }} |