1- name : Release Pipeline
1+ name : Publish custom tag
22
33on :
44 # Allows triggering the workflow manually
55 workflow_dispatch :
66 inputs :
7- provider_version :
7+ version :
88 description : " Build and publish to NPM"
9- required : false
10- default : " v0.17.4-test.1"
11-
9+ required : true
10+ default : " 3.9.0"
11+ tag :
12+ description : " Tag to apply to the release"
13+ required : true
14+ default : " test.1"
1215
1316# We're going to interact with GH from the pipelines, so we need to get some permissions
1417permissions :
@@ -33,34 +36,26 @@ jobs:
3336 uses : actions/setup-node@v4
3437 with :
3538 # Semantic release requires this as bare minimum
36- node-version : 20
37-
38- # Why this? https://github.com/npm/cli/issues/7279
39- # Why this way? https://github.com/actions/setup-node/issues/213
40- - name : Install latest npm
41- shell : bash
42- run : |
43- npm install -g npm@latest &&
44- npm --version &&
45- npm list -g --depth 0
39+ node-version : 24
4640
4741 - name : Install dependencies
4842 run : npm install
4943
50- - name : Verify the integrity of provenance attestations and registry signatures for installed dependencies
51- run : npm audit signatures
44+ - name : Setup npm auth
45+ run : |
46+ echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
47+ env :
48+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
49+
50+ - name : Set version to ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }}
51+ run : |
52+ set -x
53+ npm version ${{ github.event.inputs.version }}-${{ github.event.inputs.tag }} --no-git-tag-version
5254
5355 - name : Build the SDK for release
54- run : npm run build
56+ run : |
57+ npm run build
5558
56- - name : Release
57- env :
58- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
59- NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
59+ - name : Publish to NPM - ${{ github.event.inputs.version }}
6060 run : |
61- npm version ${{ github.event.inputs.version }} --no-git-tag-version
62- npm build
63- npm publish
64- git tag v${{ github.event.inputs.version }}
65- git push
66- git push --tags
61+ npm publish --tag ${{ github.event.inputs.tag }}
0 commit comments