Skip to content

Commit 720bbe6

Browse files
authored
Update npm publish workflow for Node.js package
1 parent ee7838e commit 720bbe6

1 file changed

Lines changed: 29 additions & 11 deletions

File tree

Lines changed: 29 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,43 @@
11
name: Node.js Package
22

33
on:
4-
release:
5-
types: [created]
4+
# Production trigger:
5+
# release:
6+
# types: [created]
7+
8+
# Temporary testing trigger:
9+
push:
10+
branches:
11+
- master
612

713
jobs:
8-
publish-yarn:
14+
publish-npm:
915
environment: publish-package
1016
runs-on: ubuntu-latest
17+
1118
permissions:
1219
contents: read
13-
packages: write
20+
1421
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-node@v2
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v6
1727
with:
18-
always-auth: true
19-
node-version: "14.x"
28+
node-version: "24"
2029
registry-url: "https://registry.npmjs.org"
21-
scope: "@modifiedcommand"
30+
31+
- name: Verify package
32+
run: |
33+
node --version
34+
npm --version
35+
npm pkg get name version
36+
npm whoami
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
2240
- name: Publish
23-
run: yarn publish --access public
41+
run: npm publish --access public
2442
env:
25-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)