Skip to content

Commit 9c91da9

Browse files
authored
Update action.yml
1 parent 916da7c commit 9c91da9

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

action.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
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."
33
runs:
44
using: "composite"
55
steps:
66
- 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' }}
108
run: |
9+
echo "${{ github.event.release.tag_name }}" > VERSION.txt
1110
git config user.name github-actions
1211
git config user.email [email protected]
1312
git add .
1413
git commit -m "Release ${{ github.event.release.tag_name }}"
1514
git push origin HEAD:${{ github.event.release.target_commitish }}
16-
shell: bash
17-
- name: "Update and commit release tag"
18-
run: |
1915
git tag --force ${{ github.event.release.tag_name }}
2016
git push --force origin ${{ github.event.release.tag_name }}
2117
shell: bash

0 commit comments

Comments
 (0)