We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b68bab commit 1680fe7Copy full SHA for 1680fe7
.github/workflows/npm-publish.yml
@@ -1,9 +1,10 @@
1
on:
2
push:
3
- branches: main
+ branches:
4
+ - '**' # Run on all branches
5
6
jobs:
- publish:
7
+ test:
8
runs-on: ubuntu-latest
9
steps:
10
- uses: actions/checkout@v4
@@ -12,6 +13,17 @@ jobs:
12
13
node-version: 'latest'
14
- run: npm ci
15
- run: npm test
16
+
17
+ publish:
18
+ needs: test
19
+ if: github.ref == 'refs/heads/main' # Only run this job on main branch
20
+ runs-on: ubuntu-latest
21
+ steps:
22
+ - uses: actions/checkout@v4
23
+ - uses: actions/setup-node@v4
24
+ with:
25
+ node-version: 'latest'
26
+ - run: npm ci
27
- uses: JS-DevTools/npm-publish@v3
28
with:
29
token: ${{ secrets.NPM_TOKEN }}
0 commit comments