File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3636 ref : ${{ inputs.ref }}
3737 - name : Install Node and dependencies
3838 uses : mongodb-labs/drivers-github-tools/node/setup@v3
39- - run : npm version "${{ inputs.version }}" --git-tag-version=false --allow-same-version
40- - run : npm publish --provenance --tag="${{ inputs.tag }}"
39+ - run : npm version "$VERSION" --git-tag-version=false --allow-same-version
40+ env :
41+ VERSION : ${{ inputs.version }}
42+ - run : npm publish --provenance --tag="$TAG"
43+ env :
44+ TAG : ${{ inputs.tag }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 99 type : string
1010
1111permissions :
12- id-token : write
12+ actions : write
13+ contents : read
1314
1415name : release-alpha
1516
@@ -18,17 +19,22 @@ jobs:
1819 runs-on : ubuntu-latest
1920 steps :
2021 - shell : bash
22+ env :
23+ ALPHA_VERSION : ${{ inputs.alphaVersion }}
2124 run : |
2225 ALPHA_SEMVER_REGEXP="-alpha(\.([0-9]|[1-9][0-9]+))?$"
2326
24- if ! [[ "${{ inputs.alphaVersion }} " =~ $ALPHA_SEMVER_REGEXP ]]; then
27+ if ! [[ "$ALPHA_VERSION " =~ $ALPHA_SEMVER_REGEXP ]]; then
2528 echo "Invalid alphaVersion string"
2629 exit 1
2730 fi
2831 - uses : actions/checkout@v5
29- - name : Install Node and dependencies
30- uses : mongodb-labs/drivers-github-tools/node/setup@v3
31- - run : npm version "${{ inputs.alphaVersion }}" --git-tag-version=false
32- - run : npm publish --provenance --tag=alpha
32+ - name : Dispatch npm-publish workflow
3333 env :
34- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
34+ GH_TOKEN : ${{ github.token }}
35+ ALPHA_VERSION : ${{ inputs.alphaVersion }}
36+ run : |
37+ node ./.github/scripts/dispatch-and-wait.mjs npm-publish.yml \
38+ tag=alpha \
39+ version="$ALPHA_VERSION" \
40+ ref="${{ github.sha }}"
Original file line number Diff line number Diff line change 66permissions :
77 contents : write
88 pull-requests : write
9- id-token : write
109
1110name : release-latest
1211
@@ -91,15 +90,20 @@ jobs:
9190
9291 publish :
9392 needs : [release_please, ssdlc, build]
93+ permissions :
94+ actions : write
95+ contents : read
9496 environment : release
9597 runs-on : ubuntu-latest
9698 steps :
9799 - uses : actions/checkout@v5
98100
99- - name : Install Node and dependencies
100- uses : mongodb-labs/drivers-github-tools/node/setup@v3
101-
102- - run : npm publish --provenance --tag=latest
101+ - name : Dispatch npm-publish workflow
103102 if : ${{ needs.release_please.outputs.release_created }}
104103 env :
105- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
104+ GH_TOKEN : ${{ github.token }}
105+ run : |
106+ node ./.github/scripts/dispatch-and-wait.mjs npm-publish.yml \
107+ tag=latest \
108+ version="$(node -p "require('./package.json').version")" \
109+ ref="${{ github.sha }}"
You can’t perform that action at this time.
0 commit comments