Skip to content

Commit 1206551

Browse files
feat(chore): add changes for new release process (#5)
* feat(chore): add changes for new release process * feat(chore): update url and config in package.json * feat(chore): add audit fixes
1 parent cb3e7b5 commit 1206551

3 files changed

Lines changed: 821 additions & 860 deletions

File tree

.github/workflows/release.yaml

Lines changed: 9 additions & 13 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
@@ -17,7 +18,10 @@ jobs:
1718
- name: Setup Node
1819
uses: actions/setup-node@v3
1920
with:
20-
node-version: '20.x'
21+
with:
22+
node-version: '22'
23+
registry-url: 'https://registry.npmjs.org'
24+
always-auth: false # important for trusted publishing
2125
- name: Configure CI Git User
2226
run: |
2327
git config --global user.name $CONFIG_USERNAME
@@ -27,24 +31,16 @@ jobs:
2731
GITHUB_PAT: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
2832
CONFIG_USERNAME: ${{ vars.RELEASE_COMMIT_USERNAME }}
2933
CONFIG_EMAIL: ${{ vars.RELEASE_COMMIT_EMAIL }}
30-
- name: Authenticate with Registry
31-
run: |
32-
echo "@${NPM_USERNAME}:registry=https://registry.npmjs.org/" > .npmrc
33-
echo "registry=https://registry.npmjs.org/" >> .npmrc
34-
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
35-
npm whoami
36-
env:
37-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
38-
NPM_USERNAME: ${{ vars.NPM_USERNAME }}
3934

4035
- name: Install 📌
41-
run: |
42-
npm install
36+
run: npm install
4337
- name: Test 🔧
4438
run: npm run test
4539
- name: Semantic Publish to NPM 🚀
4640
# "HUSKY=0" disables pre-commit-msg check (Needed in order to allow semantic-release perform the release commit)
47-
run: HUSKY=0 npx semantic-release
41+
run: |
42+
npm config set provenance true
43+
HUSKY=0 npx semantic-release
4844
env:
4945
GH_TOKEN: ${{ secrets.RELEASE_COMMIT_GH_PAT }}
5046
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)