Skip to content

Commit 5187855

Browse files
committed
Split build and release jobs
1 parent 1976f7d commit 5187855

File tree

2 files changed

+8
-25
lines changed

2 files changed

+8
-25
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,3 @@ jobs:
1616
debug: true
1717
java-version: 21
1818
build-command: ./gradlew build coverage
19-
20-
release:
21-
uses: ./.github/workflows/release-auto.yml
22-
needs: build
23-
secrets: inherit
24-
if: |
25-
needs.build.result == 'success'
26-
&& github.event_name == 'push'
27-
&& github.ref_name == github.event.repository.default_branch || (startsWith(github.ref_name, 'v') && endsWith(github.ref_name, '.x.x'))
28-
with:
29-
security-updates-only: true
30-
consider-snapshot: true

.github/workflows/release-auto.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@ on:
1313
type: boolean
1414
required: false
1515
default: false
16-
# Called from build
17-
workflow_call:
18-
inputs:
19-
security-updates-only:
20-
type: boolean
21-
required: false
22-
default: false
23-
consider-snapshot:
24-
type: boolean
25-
required: false
26-
default: false
16+
workflow_run:
17+
workflows: [ "Build" ]
18+
types: [ completed ]
19+
branches:
20+
- main
21+
- v*x.x
2722
schedule:
2823
# at 5:30 UTC every other month
2924
- cron: "30 5 1 */2 *"
@@ -33,7 +28,7 @@ jobs:
3328
uses: coditory/workflows/.github/workflows/release-auto-check.yml@v1
3429
secrets: inherit
3530
with:
36-
security-updates-only: ${{ inputs.security-updates-only }}
31+
security-updates-only: ${{ inputs.security-updates-only || github.event_name == 'workflow_run' }}
3732
debug: true
3833

3934
release:
@@ -47,7 +42,7 @@ jobs:
4742
needs: check
4843
secrets: inherit
4944
if: |
50-
inputs.consider-snapshot
45+
(inputs.consider-snapshot || github.event_name == 'workflow_run')
5146
&& needs.check.outputs.release != 'true'
5247
&& needs.check.outputs.skip-code != 'no-changes'
5348
with:

0 commit comments

Comments
 (0)