Skip to content

Commit 3b3024b

Browse files
committed
fix: Updated main to only publish on push to main.
1 parent aa7850b commit 3b3024b

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,4 @@ jobs:
3636
- run: npm test
3737
- run: npm run lint
3838

39-
publish:
40-
runs-on: ubuntu-latest
41-
needs: build
42-
env:
43-
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
44-
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
45-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
47-
steps:
48-
- uses: actions/checkout@v4
49-
- name: Setup Node.js
50-
uses: actions/setup-node@v4
51-
with:
52-
node-version: 22.x
53-
- name: Install Dependencies
54-
run: npm ci
55-
- name: Build dist
56-
run: npm run build
57-
- name: Build CLI
58-
run: npm run build:cli
59-
- name: Release to NPM
60-
env:
61-
DEBUG: semantic-release:*
62-
run: npx [email protected] --branches main
39+

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
3+
4+
name: Release
5+
6+
on:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
deploy:
13+
runs-on: ubuntu-latest
14+
env:
15+
SURGE_LOGIN: ${{ secrets.SURGE_LOGIN }}
16+
SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }}
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: 20
24+
registry-url: https://registry.npmjs.org/
25+
- name: Npm Install
26+
run: npm install
27+
- name: Build dist
28+
run: npm run build
29+
- name: Build CLI
30+
run: npm run build:cli
31+
- name: Release to NPM
32+
env:
33+
DEBUG: semantic-release:*
34+
run: npx [email protected] --branches main
35+
#

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,6 @@
9494
"commitizen": {
9595
"path": "./node_modules/cz-conventional-changelog"
9696
}
97-
}
97+
},
98+
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
9899
}

0 commit comments

Comments
 (0)