We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cc7c10 commit 986b6b7Copy full SHA for 986b6b7
.github/workflows/add-tag.yml
@@ -0,0 +1,20 @@
1
+name: Add git tag
2
+on:
3
+ pull_request:
4
+ types: [closed]
5
+jobs:
6
+ release-candidate:
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - name: checkout
10
+ uses: actions/checkout@v2
11
+ - name: Add tag
12
+ if: startsWith(github.event.pull_request.title, 'Release') && github.event.pull_request.merged == true
13
+ env:
14
+ PR_TITLE: ${{ github.event.pull_request.title }}
15
+ run: |
16
+ echo $PR_TITLE | grep -e "Release.*" || exit 1
17
+ git remote set-url origin https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
18
+ git tag $(echo $PR_TITLE | sed -E 's/.* ([0-9\-\.]*)/\1/g')
19
+ git tag -l
20
+ git push origin -f --tags
0 commit comments