Skip to content

Commit ffb37a0

Browse files
committed
Consolidate GHA jobs for efficiency
1 parent 4b520e4 commit ffb37a0

File tree

1 file changed

+10
-27
lines changed

1 file changed

+10
-27
lines changed
Lines changed: 10 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test and Build
1+
name: Test and Release
22

33
on:
44
push:
@@ -11,36 +11,13 @@ on:
1111
required: true
1212

1313
jobs:
14-
test:
14+
test-release:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Harden the runner (Audit all outbound calls)
18-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
18+
uses: step-security/harden-runner@95d9a5deda9de15063e7595e9719c11c38c90ae2 # v2.13.2
1919
with:
2020
egress-policy: audit
21-
22-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
23-
- name: Set up JDK
24-
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
25-
with:
26-
java-version: 21
27-
distribution: temurin
28-
- name: Test with Gradle
29-
run: ./gradlew assemble check
30-
31-
githubRelease:
32-
needs: test
33-
runs-on: ubuntu-latest
34-
env:
35-
GITHUB_USER: "gocd-contrib"
36-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
37-
PRERELEASE: "${{ github.event.inputs.prerelease }}"
38-
steps:
39-
- name: Harden the runner (Audit all outbound calls)
40-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
41-
with:
42-
egress-policy: audit
43-
4421
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4522
with:
4623
fetch-depth: 0
@@ -49,5 +26,11 @@ jobs:
4926
with:
5027
java-version: 21
5128
distribution: temurin
52-
- name: Build and release with Gradle
29+
- name: Test with Gradle
30+
run: ./gradlew assemble check
31+
- name: Release with Gradle
5332
run: ./gradlew githubRelease
33+
env:
34+
GITHUB_USER: "gocd-contrib"
35+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
36+
PRERELEASE: "${{ github.event.inputs.prerelease }}"

0 commit comments

Comments
 (0)