Skip to content

Commit eabb931

Browse files
committed
ci: improved release workflow
1 parent 48b257b commit eabb931

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

.github/workflows/release.yml

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
11
name: Release
22

33
on:
4-
push:
5-
tags:
6-
- 'v*.*.*'
4+
release:
5+
types: [created]
76

87
jobs:
9-
check-ci:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Wait for CI to pass
13-
id: wait-for-ci
14-
uses: fountainhead/action-wait-for-check@5a908a24814494009c4bb27c242ea38c93c593be
15-
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
17-
checkName: Test
18-
ref: ${{ github.sha }}
19-
timeoutSeconds: 1800
20-
21-
- name: Cancel the release if CI fails
22-
if: steps.wait-for-ci.outputs.conclusion == 'failure'
23-
run: exit 1
8+
test:
9+
uses: ./.github/workflows/test.yml
10+
secrets: inherit
2411

2512
release:
26-
needs: check-ci
2713
runs-on: ubuntu-latest
14+
15+
needs: test
16+
2817
permissions:
2918
id-token: write
3019
contents: read

.github/workflows/ci.yml renamed to .github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ name: CI
22

33
on:
44
push:
5+
branches: ["*"]
6+
tags-ignore: ["*"]
57
pull_request:
68
branches: [main]
9+
workflow_call:
710

811
jobs:
912
test:
10-
name: "Test"
1113
runs-on: ${{ matrix.os }}
1214
strategy:
1315
matrix:

0 commit comments

Comments
 (0)