Skip to content

Commit b897afb

Browse files
committed
Updates required to the npm publishing github workflow
- dropping use of JS-Devtools/npm-publish action in favor of direct npm commands - switching to the Trusted Publisher model - splitting workflow into two jobs so that we can package using nodejs v14 (which seems to be the only version capable of producing a package compatible with the dce-dev-wizard), and then publish using nodejs v24 which is compatible with the trusted publisher model
1 parent 3c4499a commit b897afb

3 files changed

Lines changed: 35 additions & 8 deletions

File tree

.github/workflows/npm-publish.yml

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches: [main]
77
paths-ignore:
8-
- '*.md'
8+
- "*.md"
99

1010
jobs:
1111
build:
@@ -14,9 +14,32 @@ jobs:
1414
- uses: actions/checkout@v2
1515
- uses: actions/setup-node@v1
1616
with:
17-
node-version: '14.x'
18-
registry-url: 'https://registry.npmjs.org'
17+
node-version: "14.x"
1918
- run: npm ci
20-
- uses: JS-DevTools/npm-publish@v1
19+
- run: npm pack
20+
- name: Upload package tarball
21+
uses: actions/upload-artifact@v4
2122
with:
22-
token: ${{ secrets.NPM_TOKEN }}
23+
name: package
24+
path: "*.tgz"
25+
26+
publish:
27+
needs: build
28+
runs-on: ubuntu-latest
29+
permissions:
30+
contents: read
31+
id-token: write
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: actions/setup-node@v4
36+
with:
37+
node-version: "24"
38+
registry-url: "https://registry.npmjs.org"
39+
40+
- name: Download package tarball
41+
uses: actions/download-artifact@v4
42+
with:
43+
name: package
44+
45+
- run: npm publish *.tgz --access public --tag pubfix

npm-shrinkwrap.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"name": "caccl-deploy",
3-
"version": "0.19.0",
3+
"version": "0.19.0-pubfix",
4+
"repository": {
5+
"type": "git",
6+
"url": "https://github.com/harvard-edtech/caccl-deploy.git"
7+
},
48
"description": "A cli tool for managing ECS/Fargate app deployments",
59
"main": "index.js",
610
"bin": {

0 commit comments

Comments
 (0)