Skip to content

Commit c142ca4

Browse files
committed
ci: only create release on version tags
Remove build-xxx tags on master push, only create releases when pushing v* tags.
1 parent 85aa370 commit c142ca4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ jobs:
283283
release:
284284
needs: [linux-gnu-x64, linux-gnu-arm64, linux-musl-x64, linux-musl-arm64, macos-universal]
285285
runs-on: ubuntu-latest
286-
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master')
286+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
287287
permissions:
288288
contents: write
289289
steps:
@@ -304,10 +304,10 @@ jobs:
304304
- name: Create Release
305305
uses: softprops/action-gh-release@v1
306306
with:
307-
tag_name: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || format('build-{0}', github.sha) }}
308-
name: ${{ startsWith(github.ref, 'refs/tags/v') && github.ref_name || format('Build {0}', github.sha) }}
307+
tag_name: ${{ github.ref_name }}
308+
name: ${{ github.ref_name }}
309309
draft: false
310-
prerelease: ${{ !startsWith(github.ref, 'refs/tags/v') }}
310+
prerelease: false
311311
files: Release/*.node
312312
env:
313313
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)