File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ jobs:
149149
150150 publish :
151151 runs-on : ubuntu-latest
152- if : github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
152+ if : github.event_name == 'push' || github.event_name == 'pull_request'
153153 needs :
154154 - build
155155 env :
@@ -181,42 +181,14 @@ jobs:
181181 registry-url : https://registry.npmjs.org/
182182 cache : pnpm
183183
184- - name : Release
184+ - name : Publish to NPM and sync to GitHub
185+ if : github.event_name == 'push' && github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/v')
185186 run : |
186187 pnpm -r publish --no-git-checks
187188 pnpx changelogithub
188189 env :
189190 NPM_CONFIG_PROVENANCE : true
190191
191- publish-pr :
192- runs-on : ubuntu-latest
193- if : github.event_name == 'pull_request'
194- needs :
195- - build
196- env :
197- GITHUB_TOKEN : ${{ secrets.GitHub_TOKEN }}
198- permissions :
199- contents : write
200- issues : write
201- pull-requests : write
202- id-token : write
203- steps :
204- - name : Checkout
205- uses : actions/checkout@v4
206-
207- - name : Restore Build Result
208- uses : actions/download-artifact@v4
209- with :
210- name : build-result
211-
212- - name : Setup pnpm
213- uses : pnpm/action-setup@v4
214-
215- - name : Setup Node.js
216- uses : actions/setup-node@v4
217- with :
218- node-version : 20
219- cache : pnpm
220-
221- - name : Run pkg-pr-new publish
192+ - name : Publish to pkg-pr-new
193+ if : github.ref_type != 'tag'
222194 run : pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'
You can’t perform that action at this time.
0 commit comments