Skip to content

Commit

Permalink
Automaticlly retag for the new release #92 (#93)
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
shenxianpeng authored Sep 1, 2022
1 parent 92298bd commit 8e8e8f7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
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 }}

0 comments on commit 8e8e8f7

Please sign in to comment.