Skip to content

Commit a840b9c

Browse files
committed
Bump 0.1.4
1 parent 0eb0cfc commit a840b9c

File tree

3 files changed

+34
-3
lines changed

3 files changed

+34
-3
lines changed

Diff for: .github/workflows/release.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -266,14 +266,43 @@ jobs:
266266
267267
gh release create "${{ needs.plan.outputs.tag }}" --target "$RELEASE_COMMIT" $PRERELEASE_FLAG --title "$ANNOUNCEMENT_TITLE" --notes-file "$RUNNER_TEMP/notes.txt" artifacts/*
268268
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+
269297
announce:
270298
needs:
271299
- plan
272300
- host
301+
- publish-npm
273302
# use "always() && ..." to allow us to wait for all publish jobs while
274303
# still allowing individual publish jobs to skip themselves (for prereleases).
275304
# "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') }}
277306
runs-on: "ubuntu-20.04"
278307
env:
279308
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Diff for: Cargo.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: Cargo.toml

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rust-purs-gql"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
edition = "2021"
55
default-run = "pursgql"
66
repository = "https://github.com/OxfordAbstracts/purescript-graphql-schema-gen"
@@ -54,3 +54,5 @@ install-path = "CARGO_HOME"
5454
install-updater = false
5555
# A namespace to use when publishing this package to the npm registry
5656
npm-scope = "@oxfordabstracts"
57+
# Publish jobs to run in CI
58+
publish-jobs = ["npm"]

0 commit comments

Comments
 (0)