Skip to content

Commit ec4eeed

Browse files
committed
test(ci): improve release workflow with better error handling and remove problematic conditional
1 parent 15d6121 commit ec4eeed

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,22 @@
11
name: Release
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: [CI]
6+
types: [completed]
57
branches:
68
- main
79
- rc
10+
811
workflow_dispatch:
912

1013
permissions:
1114
contents: read
1215

1316
jobs:
14-
check-ci-status:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- name: Wait for CI workflow
18-
uses: lewagon/[email protected]
19-
with:
20-
ref: ${{ github.ref }}
21-
check-name: 'CI'
22-
repo-token: ${{ secrets.GITHUB_TOKEN }}
23-
wait-interval: 30
24-
2517
release:
2618
runs-on: ubuntu-latest
27-
if: "!contains(github.event.head_commit.message, 'skip ci')"
28-
needs: [check-ci-status]
19+
# Remove the problematic conditional since workflow_run events don't have direct access to commit messages
2920
permissions:
3021
contents: write
3122
issues: write
@@ -40,6 +31,7 @@ jobs:
4031
with:
4132
app-id: ${{ secrets.APP_ID }}
4233
private-key: ${{ secrets.PRIVATE_KEY }}
34+
4335
- name: Checkout
4436
uses: actions/checkout@v4
4537
with:
@@ -57,6 +49,12 @@ jobs:
5749
run: npm ci
5850

5951
- name: Run semantic-release
52+
id: semantic-release
6053
run: npx semantic-release
6154
env:
6255
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
56+
continue-on-error: false
57+
58+
- name: Check if release was created
59+
if: steps.semantic-release.outcome == 'success'
60+
run: echo "Release created successfully"

0 commit comments

Comments
 (0)