Skip to content

Commit 8198044

Browse files
committed
Only release on tags
1 parent 5e622f6 commit 8198044

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

.github/workflows/npm.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
on: [push, pull_request]
1+
on:
2+
pull_request:
3+
push:
4+
branches:
5+
- main
26

37
jobs:
48
build:
@@ -32,10 +36,10 @@ jobs:
3236
- name: Build and Test
3337
run: npm run build-and-test
3438
- name: Release
35-
if: github.ref == 'refs/heads/main'
39+
if: github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
3640
run: npm run release
3741
- name: GitHub Release
38-
if: github.ref == 'refs/heads/main'
42+
if: github.ref == 'refs/heads/main' && startsWith(github.ref, 'refs/tags/v')
3943
uses: ncipollo/release-action@v1
4044
with:
4145
artifacts: dist/layer.zip

0 commit comments

Comments
 (0)