File tree Expand file tree Collapse file tree 4 files changed +50
-72
lines changed
Expand file tree Collapse file tree 4 files changed +50
-72
lines changed Original file line number Diff line number Diff line change 1515 description : ' npm publish tag (e.g., latest, nightly)'
1616 default : ' '
1717 type : string
18- secrets :
19- npm-token :
20- description : ' NPM auth token (required unless `dry-run: true`)'
21- required : false
2218
2319jobs :
2420 npm-publish :
25- uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-npm.yml@publish-npm-v1.5 .0
21+ uses : iExecBlockchainComputing/github-actions-workflows/.github/workflows/publish-npm.yml@publish-npm-v1.6 .0
2622 with :
2723 install-command : npm ci
2824 build-command : npm run build
3127 version : ${{ inputs.version }}
3228 environment : ${{ (inputs.dry-run && '') || inputs.tag }}
3329 provenance : ${{ !inputs.dry-run }}
34- secrets :
35- npm-token : ${{ secrets.npm-token }}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ # ⚠️ THIS WORKFLOW IS THE TRUSTED PUBLISHER CONFIGURED ON NPMJS.COM, DO NOT RENAME OR DELETE THIS FILE ⚠️
2+ name : Publish NPM Package
3+
4+ on :
5+ # For staging releases
6+ workflow_dispatch :
7+ # For latest releases
8+ release :
9+ types : [published]
10+
11+ permissions :
12+ id-token : write # Required for OIDC
13+ packages : write
14+ contents : read
15+
16+ jobs :
17+ set-staging-version :
18+ # Only run for manual dispatch on main branch
19+ if : ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+ - name : Set up Node.js
25+ uses : actions/setup-node@v4
26+ - name : Set publish version
27+ id : set-staging-version
28+ run : |
29+ CURRENT_VERSION=$(npm pkg get version | tr -d '"')
30+ NIGHTLY_VERSION="${CURRENT_VERSION}-nightly-${GITHUB_SHA::7}"
31+ echo "VERSION=${NIGHTLY_VERSION}" >> $GITHUB_OUTPUT
32+ outputs :
33+ VERSION : ${{ steps.set-staging-version.outputs.VERSION }}
34+
35+ publish-npm-staging :
36+ # Only run for manual dispatch on main branch
37+ if : ${{ github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/main' }}
38+ uses : ./.github/workflows/reusable-npm.yml
39+ needs : set-staging-version
40+ with :
41+ tag : ${{ github.event.inputs.tag }}
42+ version : ${{ needs.set-staging-version.outputs.VERSION }}
43+
44+ publish-npm-latest :
45+ # # Only run for release published with tag "web3mail-v*"
46+ if : ${{ github.event_name == 'release' && startsWith(github.ref_name,'web3mail-v') }}
47+ uses : ./.github/workflows/reusable-npm.yml
48+ with :
49+ tag : ' latest'
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments