-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.47 KB
/
build.yml
File metadata and controls
59 lines (50 loc) · 1.47 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: Build And Upload
on:
push:
tags:
- "*"
permissions:
contents: write
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
if: matrix.os != 'windows-latest'
- name: Run unit tests
run: ./gradlew ciTest --no-daemon --info
shell: bash
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout project sources
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run build with Gradle Wrapper
run: ./gradlew build -x test --no-daemon -Partifact_version=${{ github.ref_name }}
- name: Create Release and Upload Jar
run: |
gh release create ${{ github.ref_name }} -t "Release ${{ github.ref_name }}"
gh release upload "${{ github.ref_name }}" build/libs/* --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}