-
Notifications
You must be signed in to change notification settings - Fork 23
37 lines (35 loc) · 1.09 KB
/
test_and_build.yml
File metadata and controls
37 lines (35 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Test and Release
on:
push:
branches: [ master ]
workflow_dispatch:
inputs:
prerelease:
description: 'The release should be an experimental release'
default: 'NO'
required: true
jobs:
test-release:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0
with:
egress-policy: audit
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@f2beeb24e141e01a676f977032f5a29d81c9e27e # v5.1.0
with:
java-version: 21
distribution: temurin
cache: gradle
- name: Test with Gradle
run: ./gradlew assemble check
- name: Release with Gradle
run: ./gradlew githubRelease
env:
GITHUB_USER: "gocd-contrib"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PRERELEASE: "${{ github.event.inputs.prerelease }}"