Skip to content

Commit 51e07d2

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

File tree

2 files changed

+10
-20
lines changed

2 files changed

+10
-20
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,18 @@
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
2410

2511
release:
26-
needs: check-ci
2712
runs-on: ubuntu-latest
13+
14+
needs: test
15+
2816
permissions:
2917
id-token: write
3018
contents: read
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)