Skip to content

Commit 89021b7

Browse files
committed
ci: Add support for trusted publisher workflow
1 parent 6929ec9 commit 89021b7

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
description: "ORR id for the change/release"
77
required: true
88
type: string
9+
default: ORR-8317
10+
dry_run:
11+
description: "Run the publish step in dry-run"
12+
required: true
13+
type: boolean
14+
default: false
915

1016
jobs:
1117
publish:
@@ -14,6 +20,7 @@ jobs:
1420
outputs:
1521
release_number: ${{steps.get_latest_release_number.outputs.release_tag}}
1622
permissions:
23+
id-token: write
1724
contents: write
1825
pull-requests: write
1926
steps:
@@ -24,7 +31,7 @@ jobs:
2431
path: xero-node
2532

2633
- name: Set up Node environment
27-
uses: actions/setup-node@v4
34+
uses: actions/setup-node@v6
2835
with:
2936
node-version: 20
3037
cache: 'npm'
@@ -52,7 +59,7 @@ jobs:
5259
- name: Publish to npm
5360
env:
5461
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
55-
run: npm publish
62+
run: npm publish ${{ inputs.dry_run && '--dry-run' || '' }}
5663
working-directory: xero-node
5764

5865
notify-codegen-repo:

0 commit comments

Comments
 (0)