File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
- name : ' Create VERSION.txt'
2
- description : ' GitHub Action to write a release' s tag name to VERSION.txt and include it in the release.'
1
+ name : " Create VERSION.txt"
2
+ description : " GitHub Action to write a release's tag name to VERSION.txt and include it in the release."
3
3
runs :
4
4
using : " composite"
5
5
steps :
6
6
- name : " Write VERSION.txt"
7
- run : echo "${{ github.event.release.tag_name }}" > VERSION.txt
8
- shell : bash
9
- - name : " Commit to GitHub"
7
+ if : ${{ github.event_name == 'release' }}
10
8
run : |
9
+ echo "${{ github.event.release.tag_name }}" > VERSION.txt
11
10
git config user.name github-actions
12
11
git config user.email [email protected]
13
12
git add .
14
13
git commit -m "Release ${{ github.event.release.tag_name }}"
15
14
git push origin HEAD:${{ github.event.release.target_commitish }}
16
- shell : bash
17
- - name : " Update and commit release tag"
18
- run : |
19
15
git tag --force ${{ github.event.release.tag_name }}
20
16
git push --force origin ${{ github.event.release.tag_name }}
21
17
shell : bash
You can’t perform that action at this time.
0 commit comments