Skip to content

Commit 9b6b61c

Browse files
authored
fix github action triggering a new release upon each commit (#197)
1 parent 598d7d3 commit 9b6b61c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/npm-release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ env:
1414

1515
jobs:
1616
create-release:
17+
if: github.event_name == 'release'
1718
runs-on: ubuntu-latest
1819
outputs:
1920
release_created: ${{ steps.release.outputs.release_created }}
@@ -70,6 +71,7 @@ jobs:
7071
prerelease: false
7172

7273
build-and-publish:
74+
if: github.event_name == 'release'
7375
needs: create-release
7476
runs-on: ubuntu-latest
7577

@@ -130,6 +132,7 @@ jobs:
130132
node -e "console.log('Testing binary load...'); try { require('./index.js'); console.log('Binary loaded successfully!'); } catch(e) { console.error('Failed to load binary:', e); process.exit(1); }"
131133
132134
publish-npm:
135+
if: github.event_name == 'release'
133136
needs: build-and-publish
134137
runs-on: ubuntu-latest
135138

@@ -161,6 +164,7 @@ jobs:
161164
cp _build/liblibCacheSim.a libCacheSim-node/vendor/
162165
cp -r libCacheSim/include/* libCacheSim-node/vendor/include/
163166
167+
164168
- name: Publish to NPM
165169
working-directory: libCacheSim-node
166170
run: npm publish --access public

0 commit comments

Comments
 (0)