Skip to content

Commit 479c1f5

Browse files
committed
ci: add build_type input to workflows for conditional release creation
1 parent 6d295c5 commit 479c1f5

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

.github/workflows/linux.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
description: 'tagname'
88
type: string
99
required: true
10+
build_type:
11+
description: 'Build type'
12+
type: choice
13+
required: true
14+
default: 'ci'
15+
options:
16+
- ci
17+
- rel
1018

1119
jobs:
1220
build:
@@ -64,6 +72,7 @@ jobs:
6472
path: out/install/fagram-${{ env.TAGNAME }}.tar.gz
6573

6674
- name: Create Release
75+
if: github.event.inputs.build_type == 'rel'
6776
uses: softprops/action-gh-release@v2
6877
with:
6978
tag_name: ${{ env.TAGNAME }}
@@ -77,6 +86,7 @@ jobs:
7786
trigger-rpm:
7887
runs-on: ubuntu-latest
7988
needs: build
89+
if: github.event.inputs.build_type == 'rel'
8090
steps:
8191
- name: Trigger repository dispatch event
8292
uses: peter-evans/repository-dispatch@v3

.github/workflows/win-release-x64.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ on:
77
description: 'tagname'
88
type: string
99
required: true
10+
build_type:
11+
description: 'Build type'
12+
type: choice
13+
required: true
14+
default: 'ci'
15+
options:
16+
- ci
17+
- rel
1018

1119
jobs:
1220

@@ -123,7 +131,7 @@ jobs:
123131
path: artifact/
124132

125133
- name: Create Release
126-
if: env.UPLOAD_ARTIFACT == 'true'
134+
if: env.UPLOAD_ARTIFACT == 'true' && github.event.inputs.build_type == 'rel'
127135
uses: softprops/action-gh-release@v2
128136
with:
129137
tag_name: ${{ env.RELEASE_TAG }}

0 commit comments

Comments
 (0)