Skip to content

Commit 2e00132

Browse files
author
Nico Ismaili
committed
chore(ci): used npm for publishing
1 parent e22cc10 commit 2e00132

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,20 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
1818
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: "v22.14.0"
22+
registry-url: 'https://registry.npmjs.org'
1923
- name: Install dependencies (Cache hit will skip actual installation)
2024
run: |
2125
bun install --frozen-lockfile
22-
- name: Run tests
23-
run: |
24-
bun test
2526
- name: Build package
2627
run: |
2728
bun run build
2829
- name: Publish package
2930
# only run this step if it's a release or a manual trigger
3031
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
3132
run: |
32-
bun publish --access public
33+
npm publish --provenance --access public
3334
env:
34-
NPM_CONFIG_TOKEN: ${{secrets.NPM_TOKEN}}
35+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.14.0

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
"url": "https://github.com/nico-i/commitlint-plugin-spend/issues"
3535
},
3636
"scripts": {
37-
"build": "bun build ./index.ts --outdir ./out",
38-
"test": "bun test --coverage",
37+
"build": "bun test && bun build ./index.ts --outdir ./out",
3938
"prepare": "husky || true"
4039
},
4140
"peerDependencies": {

0 commit comments

Comments
 (0)