chore: simplify ref_type test

This commit is contained in:
Jason Pickens 2025-03-19 16:06:47 +13:00
parent ab50eebb64
commit 97ff7584da
No known key found for this signature in database
GPG key ID: 1CB83B8E711DF56E

View file

@ -54,7 +54,7 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: github.ref_type == 'tag'
``` ```
You can also use push config tag filter You can also use push config tag filter
@ -106,7 +106,7 @@ jobs:
run: cat Release.txt run: cat Release.txt
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: github.ref_type == 'tag'
with: with:
files: Release.txt files: Release.txt
``` ```
@ -130,7 +130,7 @@ jobs:
run: cat Release.txt run: cat Release.txt
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: github.ref_type == 'tag'
with: with:
files: | files: |
Release.txt Release.txt
@ -162,7 +162,7 @@ jobs:
run: echo "# Good things have arrived" > ${{ github.workspace }}-CHANGELOG.txt run: echo "# Good things have arrived" > ${{ github.workspace }}-CHANGELOG.txt
- name: Release - name: Release
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/') if: github.ref_type == 'tag'
with: with:
body_path: ${{ github.workspace }}-CHANGELOG.txt body_path: ${{ github.workspace }}-CHANGELOG.txt
repository: my_gh_org/my_gh_repo repository: my_gh_org/my_gh_repo