Skip to content

Commit

Permalink
Automaticlly retag for the new release #92
Browse files Browse the repository at this point in the history
  • Loading branch information
shenxianpeng committed Aug 31, 2022
1 parent 92298bd commit d90b4c1
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
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, tag or SHA to update the tag on'
default: 'main'
required: true

permissions:
contents: read

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 latest -m 'Retag ${{ inputs.tag }}'
git push origin ${{ inputs.tag }}

0 comments on commit d90b4c1

Please sign in to comment.