@@ -102,6 +102,7 @@ jobs:
102102
103103 - name : 🚀 Release to NPM
104104 uses : changesets/action@v1
105+ id : changesets
105106 with :
106107 commit : ' chore: 🤖 update versions'
107108 title : ' chore: 🤖 update versions'
@@ -112,28 +113,9 @@ jobs:
112113 GITHUB_TOKEN : ${{ secrets.GPR_TOKEN }}
113114 NPM_TOKEN : ${{ secrets.NPMJS_TOKEN }}
114115
115- - name : Remove existing NPM .npmrc
116- run : rm -f "$HOME/.npmrc"
117-
118- - name : ⎔ Setup Node.js ${{ matrix.node-version }} for Github Packages
119- uses : actions/setup-node@v3
120- with :
121- cache : ' pnpm'
122- node-version : ${{ matrix.node-version }}
123- registry-url : ' https://npm.pkg.github.com/'
124-
125- - name : 📥 Install dependencies
126- run : pnpm install
127- env :
128- NODE_AUTH_TOKEN : ${{ secrets.GPR_TOKEN }}
129-
130116 - name : 🚀 Release to Github Packages
131- uses : changesets/action@v1
132- with :
133- commit : ' chore: update versions'
134- title : ' chore: update versions'
135- publish : pnpm release:publish
136- version : pnpm release:version
117+ if : steps.changesets.outputs.published == 'true'
118+ run : rm -f "$HOME/.npmrc" && pnpm install && npm publish --registry=https://npm.pkg.github.com/
137119 env :
138120 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
139121 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
0 commit comments