Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .changeset/tidy-jars-publish.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
"@ordermentum/asap-test-helpers": patch
"@ordermentum/express-asap": patch
"@ordermentum/asap-core": patch
"@ordermentum/axios-asap": patch
"@ordermentum/hapi-asap": patch
---

Add `repository` metadata to the published packages. Releases now authenticate
to npm with GitHub Actions OIDC (trusted publishing) rather than a long-lived
token.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ on:

concurrency: ${{ github.workflow }}-${{ github.ref }}

permissions:
contents: write
pull-requests: write
id-token: write

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
- name: Setup Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 18.x
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
node-version: 22.x

# Trusted publishing requires npm >= 11.5.1; Node 22 ships npm 10.x.
- name: Upgrade npm
run: npm install -g npm@latest

- run: yarn
- run: yarn build

Expand All @@ -35,4 +42,3 @@ jobs:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions internal/test-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "0.1.0",
"main": "build/index.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ordermentum/asap-javascript.git",
"directory": "internal/test-helpers"
},
"files": [
"build/*"
],
Expand Down
5 changes: 5 additions & 0 deletions packages/asap-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"build/*"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ordermentum/asap-javascript.git",
"directory": "packages/asap-core"
},
"devDependencies": {
"@ordermentum/asap-test-helpers": "*",
"@types/chai": "4.3.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/axios-asap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
"build/*"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ordermentum/asap-javascript.git",
"directory": "packages/axios-asap"
},
"devDependencies": {
"@ordermentum/asap-test-helpers": "*",
"@types/chai": "4.3.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/express-asap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "1.0.1",
"main": "build/index.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ordermentum/asap-javascript.git",
"directory": "packages/express-asap"
},
"files": [
"build/*"
],
Expand Down
5 changes: 5 additions & 0 deletions packages/hapi-asap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "1.0.1",
"main": "build/index.js",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/ordermentum/asap-javascript.git",
"directory": "packages/hapi-asap"
},
"files": [
"build/*"
],
Expand Down
Loading