File tree 3 files changed +34
-3
lines changed
3 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -266,14 +266,43 @@ jobs:
266
266
267
267
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
268
268
269
+ publish-npm :
270
+ needs :
271
+ - plan
272
+ - host
273
+ runs-on : " ubuntu-20.04"
274
+ env :
275
+ GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
276
+ PLAN : ${{ needs.plan.outputs.val }}
277
+ if : ${{ !fromJson(needs.plan.outputs.val).announcement_is_prerelease || fromJson(needs.plan.outputs.val).publish_prereleases }}
278
+ steps :
279
+ - name : Fetch npm packages
280
+ uses : actions/download-artifact@v4
281
+ with :
282
+ pattern : artifacts-*
283
+ path : npm/
284
+ merge-multiple : true
285
+ - uses : actions/setup-node@v4
286
+ with :
287
+ node-version : ' 20.x'
288
+ registry-url : ' https://registry.npmjs.org'
289
+ - run : |
290
+ for release in $(echo "$PLAN" | jq --compact-output '.releases[] | select([.artifacts[] | endswith("-npm-package.tar.gz")] | any)'); do
291
+ pkg=$(echo "$release" | jq '.artifacts[] | select(endswith("-npm-package.tar.gz"))' --raw-output)
292
+ npm publish --access public "./npm/${pkg}"
293
+ done
294
+ env:
295
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
296
+
269
297
announce :
270
298
needs :
271
299
- plan
272
300
- host
301
+ - publish-npm
273
302
# use "always() && ..." to allow us to wait for all publish jobs while
274
303
# still allowing individual publish jobs to skip themselves (for prereleases).
275
304
# "host" however must run to completion, no skipping allowed!
276
- if : ${{ always() && needs.host.result == 'success' }}
305
+ if : ${{ always() && needs.host.result == 'success' && (needs.publish-npm.result == 'skipped' || needs.publish-npm.result == 'success') }}
277
306
runs-on : " ubuntu-20.04"
278
307
env :
279
308
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " rust-purs-gql"
3
- version = " 0.1.3 "
3
+ version = " 0.1.4 "
4
4
edition = " 2021"
5
5
default-run = " pursgql"
6
6
repository = " https://github.com/OxfordAbstracts/purescript-graphql-schema-gen"
@@ -54,3 +54,5 @@ install-path = "CARGO_HOME"
54
54
install-updater = false
55
55
# A namespace to use when publishing this package to the npm registry
56
56
npm-scope = " @oxfordabstracts"
57
+ # Publish jobs to run in CI
58
+ publish-jobs = [" npm" ]
You can’t perform that action at this time.
0 commit comments