Skip to content

Commit 41dd453

Browse files
committed
fix(schema): use pnpm and trusted publishers
1 parent 60dda54 commit 41dd453

2 files changed

Lines changed: 17 additions & 6 deletions

File tree

components/schema/.github/workflows/release.yaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55

66
name: Release a New Version
77

8+
permissions:
9+
id-token: write # Required for OIDC
10+
contents: write
11+
812
jobs:
913
releaseandpublish:
1014
name: Release on Github and Publish on NPM
@@ -21,11 +25,16 @@ jobs:
2125
registry-url: 'https://registry.npmjs.org'
2226
scope: '@crystallize'
2327

28+
- name: ⎔ Set up pnpm
29+
uses: pnpm/action-setup@v4
30+
with:
31+
version: 10.14.0
32+
2433
- name: 📥 Download deps
25-
run: yarn install
34+
run: pnpm install
2635

2736
- name: 🏄 Run the tests
28-
run: yarn build && yarn test
37+
run: pnpm build && pnpm test
2938

3039
- name: 🏷 Create Release
3140
uses: actions/create-release@v1
@@ -38,7 +47,9 @@ jobs:
3847
prerelease: false
3948

4049
- name: 📢 Publish to NPM
41-
run: yarn publish --new-version ${GITHUB_REF#"refs/tags/"} --no-git-tag-version
50+
run: npm publish --provenance --access public
4251
env:
43-
NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53+
# Use OIDC for npm authentication instead of NPM_TOKEN
54+
NODE_AUTH_TOKEN: ''
55+
NPM_TOKEN: ''

components/schema/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@crystallize/schema",
3-
"version": "6.3.3",
3+
"version": "6.3.4",
44
"license": "MIT",
55
"exports": {
66
"./catalogue": {

0 commit comments

Comments
 (0)