Skip to content

Commit bc4748e

Browse files
committed
Split build and release jobs
1 parent 44b6a5c commit bc4748e

File tree

2 files changed

+26
-20
lines changed

2 files changed

+26
-20
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,4 @@ jobs:
2727
&& github.ref_name == github.event.repository.default_branch || (startsWith(github.ref_name, 'v') && endsWith(github.ref_name, '.x.x')))
2828
with:
2929
security-updates-only: true
30-
31-
snapshot:
32-
uses: ./.github/workflows/release.yml
33-
needs: build
34-
secrets: inherit
35-
if: |
36-
needs.build.result == 'success'
37-
&& github.event_name == 'push'
38-
&& (github.ref_name == github.event.repository.default_branch || (startsWith(github.ref_name, 'v') && endsWith(github.ref_name, '.x.x')))
39-
&& needs.release.outputs.released == false
40-
with:
41-
snapshot: true
30+
consider-snapshot: true

.github/workflows/release-auto.yml

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,22 @@ on:
88
type: boolean
99
required: false
1010
default: false
11+
consider-snapshot:
12+
description: "Consider snapshot"
13+
type: boolean
14+
required: false
15+
default: false
1116
# Called from build
1217
workflow_call:
13-
output:
14-
result:
15-
type: string
16-
description: 'Release result'
17-
value: ${{ jobs.check.outputs.release == 'true' && jobs.release.result || 'skipped' }}
18-
released:
18+
inputs:
19+
security-updates-only:
20+
type: boolean
21+
required: false
22+
default: false
23+
consider-snapshot:
1924
type: boolean
20-
description: 'Released'
21-
value: ${{ jobs.check.outputs.release == 'true' && jobs.release.result == 'success' }}
25+
required: false
26+
default: false
2227
schedule:
2328
# at 5:30 UTC every other month
2429
- cron: "30 5 1 */2 *"
@@ -34,5 +39,17 @@ jobs:
3439
release:
3540
uses: ./.github/workflows/release.yml
3641
secrets: inherit
42+
needs: check
3743
if: needs.check.outputs.release == 'true'
44+
45+
snapshot:
46+
uses: ./.github/workflows/release.yml
3847
needs: check
48+
secrets: inherit
49+
if: |
50+
inputs.consider-snapshot
51+
&& needs.check.outputs.release != 'true'
52+
&& needs.check.outputs.skip-code != 'no-changes'
53+
with:
54+
snapshot: true
55+

0 commit comments

Comments
 (0)