forked from hectorqin/reader
-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (81 loc) · 2.17 KB
/
release-github.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
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Publish Github Releases
on:
# push:
# tags:
# - 'v**'
# branches:
# - master
workflow_dispatch:
jobs:
buildRelease:
if: github.repository == 'hectorqin/reader'
name: "Build And Release"
runs-on: macos-11
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Setup node
uses: actions/setup-node@v2
with:
node-version: '14'
-
name: Build web
run: cd web && npm install && npm run build && mv ./dist ../src/main/resources/web
-
name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'
cache: 'gradle'
-
name: Build MacOS package
run:
JAVAFX_PLATFORM=mac ./gradlew packageReaderMac
-
name: Build Linux package
run:
JAVAFX_PLATFORM=linux ./gradlew packageReaderLinux
-
name: Build Windows package
run:
JAVAFX_PLATFORM=win ./gradlew packageReaderWin
-
name: Build server jar
run:
rm src/main/java/com/htmake/reader/ReaderUIApplication.kt && gradle -b cli.gradle assemble --info
-
name: Show files.
run: |
echo Showing current directory:
ls
echo Showing ./target directory:
ls ./build
echo Showing ./target directory:
ls ./build/libs
-
name: Pre Release
if: ${{contains(github.ref, 'master')}}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
./build/*.pkg
./build/*.zip
./build/libs/*.jar
-
name: Tagged Release
if: ${{contains(github.ref, 'v')}}
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
./build/*.pkg
./build/*.zip
./build/libs/*.jar