File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 44 push :
55 branches :
66 - main
7+ workflow_dispatch :
78
89concurrency : ${{ github.workflow }}-${{ github.ref }}
910
@@ -15,38 +16,39 @@ jobs:
1516 steps :
1617 - name : Check out repository
1718 uses : actions/checkout@v4
18-
19+
1920 - name : Setup PNPM
2021 uses : pnpm/action-setup@v4
21-
22+
2223 - name : Setup Node.js
2324 uses : actions/setup-node@v4
2425 with :
2526 node-version : 20
2627 cache : ' pnpm'
27-
28+
2829 - name : Install dependencies
2930 run : pnpm install --frozen-lockfile
30-
31+
3132 - name : Check for unreleased changesets
3233 id : has-changesets
3334 uses : andstor/file-existence-action@v2
3435 with :
3536 files : " .changeset/!(README).md"
36-
37+
3738 # If there are unreleased changesets, validate the project before creating the changesets PR
3839 - name : Require build, test and lint to pass
3940 if : steps.has-changesets.outputs.files_exists == 'true'
4041 run : |
4142 pnpm build
4243 pnpm test
4344 pnpm lint
44-
45+
4546 # Run changesets action either if there are unreleased changesets (= a PR must be created)
4647 # or if the commit message matches the release PR (= new versions must be published to NPM)
48+ # or if the workflow was triggered manually through `workflow_dispatch`
4749 - name : Create changesets PR or publish to NPM
4850 id : changesets
49- if : steps.has-changesets.outputs.files_exists == 'true' || startsWith(github.event.head_commit.message, '[CI] Release')
51+ if : steps.has-changesets.outputs.files_exists == 'true' || startsWith(github.event.head_commit.message, '[CI] Release') || github.event_name == 'workflow_dispatch'
5052 uses : changesets/action@v1
5153 with :
5254 title : ' [CI] Release'
You can’t perform that action at this time.
0 commit comments