-
Notifications
You must be signed in to change notification settings - Fork 519
70 lines (55 loc) · 1.76 KB
/
build-and-prerelease.yml
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
60
61
62
63
64
65
66
67
68
69
70
name: Build and Pre-release
on: []
permissions: write-all
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Set up repository
uses: actions/checkout@master
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-package: jdk+fx
- name: Run Clean Checks
run: ./gradlew clean check
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Set up repository
uses: actions/checkout@master
- name: Validate Gradle Wrapper
uses: gradle/wrapper-validation-action@v2
- name: Setup JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '11'
java-package: jdk+fx
- name: Build Jar
run: ./gradlew clean shadowJar
- name: Get Date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
- name: Get short SHA
id: short_sha
run: echo "::set-output name=sha7::$(echo ${GITHUB_SHA} | cut -c1-7)"
- name: Create Pre-Release
id: create_pre_release
uses: softprops/action-gh-release@v2
with:
draft: false
prerelease: true
files: build/libs/clinicmate.jar
name: Nightly Release ${{ steps.date.outputs.date }}-${{ steps.short_sha.outputs.sha7 }}
tag_name: nightly-${{ steps.date.outputs.date }}-${{ steps.short_sha.outputs.sha7 }}
fail_on_unmatched_files: true
token: ${{ secrets.GITHUB_TOKEN }}