Skip to content

Commit 634777a

Browse files
committed
ci: update release workflow
1 parent 05d3280 commit 634777a

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/release.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
11
name: Release
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
8+
9+
permissions:
10+
contents: write
11+
pull-requests: write
712

813
jobs:
914
release:
15+
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' && github.event.workflow_run.head_branch == 'main' }}
1016
runs-on: ubuntu-latest
1117

1218
steps:
1319
- uses: actions/checkout@v4
1420
with:
1521
fetch-depth: 0
22+
ref: ${{ github.event.workflow_run.head_sha }}
1623

1724
- uses: pnpm/action-setup@v4
1825
with:
@@ -25,12 +32,11 @@ jobs:
2532
registry-url: https://registry.npmjs.org
2633

2734
- run: pnpm install --frozen-lockfile
28-
- run: pnpm run check
29-
- run: pnpm run build
3035

3136
- name: Create Release Pull Request or Publish
3237
uses: changesets/action@v1
3338
with:
39+
commit: "chore: version packages"
3440
version: pnpm run version-packages
3541
publish: pnpm run release
3642
env:

0 commit comments

Comments
 (0)