-
Notifications
You must be signed in to change notification settings - Fork 16
59 lines (56 loc) · 1.83 KB
/
test_and_build.yml
File metadata and controls
59 lines (56 loc) · 1.83 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '21', '25' ]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: ${{ matrix.java }}
distribution: temurin
- run: git config --global user.email "you@example.com"
- run: git config --global user.name "Your Name"
- name: Test with Gradle
run: ./gradlew assemble check
githubRelease:
needs: test
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@fe104658747b27e96e4f7e80cd0a94068e53901d # v2.16.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
- name: Set up JDK
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: 21
distribution: temurin
cache: gradle
- name: Release with Gradle
run: ./gradlew githubRelease
env:
GITHUB_USER: "TWChennai"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
PRERELEASE: "${{ github.event.inputs.prerelease }}"