Skip to content

Commit 958d7f0

Browse files
committed
chore(ci-cd): update the release workflow
GH-00
1 parent 65f1a57 commit 958d7f0

File tree

3 files changed

+14852
-15088
lines changed

3 files changed

+14852
-15088
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ name: Release [Manual]
44
on: workflow_dispatch
55
permissions:
66
contents: write
7+
id-token: write
78
jobs:
89
Release:
910
runs-on: ubuntu-latest
@@ -18,6 +19,8 @@ jobs:
1819
uses: actions/setup-node@v4
1920
with:
2021
node-version: '24.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
always-auth: false # important for trusted publishing
2124
- name: Configure CI Git User
2225
run: |
2326
git config --global user.name $CONFIG_USERNAME
@@ -27,14 +30,6 @@ jobs:
2730
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
2831
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
2932
CONFIG_EMAIL: ${{ vars.RELEASE_COMMIT_EMAIL }}
30-
- name: Authenticate with Registry
31-
run: |
32-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
33-
npm whoami
34-
env:
35-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
36-
NPM_USERNAME: ${{ vars.NPM_USERNAME }}
37-
3833
- name: Install Dependencies
3934
run: npm ci --ignore-scripts
4035

@@ -54,6 +49,4 @@ jobs:
5449
- name: Publish to NPM 🚀
5550
# To always compare changes from registry
5651
# using `from-package` compares version in local package.json with registry and publish it if required.
57-
run: npm publish -ws --dry-run
58-
env:
59-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
run: HUSKY=0 npm_config_ignore_scripts=true npx lerna publish from-package --yes

0 commit comments

Comments
 (0)