Skip to content

Commit c749869

Browse files
committed
ci: fix pipeline behaviour
1 parent 4d839a3 commit c749869

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

.github/workflows/release.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,22 @@
11
name: Release
22

33
on:
4+
workflow_run:
5+
workflows: ["Test"]
6+
types:
7+
- completed
48
create:
59
tags:
610
- "v*.*.*"
711

812
jobs:
913
build-and-release:
10-
needs: test
11-
if: startsWith(github.ref, 'refs/tags/v')
14+
if: github.event.workflow_run.conclusion == 'success'
1215
runs-on: ubuntu-latest
16+
17+
permissions:
18+
contents: write
19+
1320
steps:
1421
- uses: actions/checkout@v4
1522

@@ -24,7 +31,6 @@ jobs:
2431
- name: Create Release
2532
id: create_release
2633
uses: softprops/action-gh-release@v2
27-
if: startsWith(github.ref, 'refs/tags/')
2834
with:
2935
files: |
3036
Release.txt

.github/workflows/test.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ name: Test
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
7-
branches: [main]
8+
branches:
9+
- main
810
create:
911
tags:
1012
- "v*.*.*"

0 commit comments

Comments
 (0)