Skip to content

Commit 581b12c

Browse files
authored
chore: simplify ref_type test (#598)
1 parent b540ad2 commit 581b12c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
uses: actions/checkout@v4
5555
- name: Release
5656
uses: softprops/action-gh-release@v2
57-
if: startsWith(github.ref, 'refs/tags/')
57+
if: github.ref_type == 'tag'
5858
```
5959
6060
You can also use push config tag filter
@@ -106,7 +106,7 @@ jobs:
106106
run: cat Release.txt
107107
- name: Release
108108
uses: softprops/action-gh-release@v2
109-
if: startsWith(github.ref, 'refs/tags/')
109+
if: github.ref_type == 'tag'
110110
with:
111111
files: Release.txt
112112
```
@@ -130,7 +130,7 @@ jobs:
130130
run: cat Release.txt
131131
- name: Release
132132
uses: softprops/action-gh-release@v2
133-
if: startsWith(github.ref, 'refs/tags/')
133+
if: github.ref_type == 'tag'
134134
with:
135135
files: |
136136
Release.txt
@@ -162,7 +162,7 @@ jobs:
162162
run: echo "# Good things have arrived" > ${{ github.workspace }}-CHANGELOG.txt
163163
- name: Release
164164
uses: softprops/action-gh-release@v2
165-
if: startsWith(github.ref, 'refs/tags/')
165+
if: github.ref_type == 'tag'
166166
with:
167167
body_path: ${{ github.workspace }}-CHANGELOG.txt
168168
repository: my_gh_org/my_gh_repo

0 commit comments

Comments
 (0)