-
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (47 loc) · 1.85 KB
/
publish.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
name: Build on release
on:
push:
# Sequence of patterns matched against refs/tags
tags: 'v*' # Push events to matching v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Build with Gradle
env:
BUILD_RELEASE: ${{ github.event.release.prerelease == false }}
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
cache-disabled: true
arguments: build --scan --stacktrace --warning-mode all
- name: Optimise built jar file
run: java -ea -jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar optimise --mode=CHEAP ./deft4j-cmd/build/libs/deft4j-cmd-all.jar ./deft4j-cmd/build/libs/deft4j-cmd-all-opt.jar
- name: Optimise built jar file
run: |
rm ./deft4j-cmd/build/libs/deft4j-cmd-all.jar
mv ./deft4j-cmd/build/libs/deft4j-cmd-all-opt.jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar
- name: Optimise built jar file
run: java -ea -jar ./deft4j-cmd/build/libs/deft4j-cmd-all.jar optimise --mode=CHEAP ./deft4j-cmd/build/libs/deft4j-cmd.jar ./deft4j-cmd/build/libs/deft4j-cmd.jar
- name: Draft release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ github.ref }}
name: Draft release ${{ github.ref }}
body: Replace this text with the description of this release!
draft: true
prerelease: false
files: |
deft4j-base/build/libs/*
deft4j-cmd/build/libs/*
deft4j-compress/build/libs/*
deft4j-container/build/libs/*