-
-
Notifications
You must be signed in to change notification settings - Fork 6
213 lines (181 loc) Β· 6.82 KB
/
Copy pathapp.yml
File metadata and controls
213 lines (181 loc) Β· 6.82 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
name: App
on:
push:
branches:
- dev
release:
types: [created]
jobs:
build_app:
runs-on: ubuntu-latest
steps:
- name: π© Grab the code
uses: actions/checkout@v3
- name: ποΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: ποΈ Set deploy channel env
run: echo "DEPLOY_CHANNEL=${{ (github.event.release.prerelease && 'beta') || 'stable' }}" >> $GITHUB_ENV && echo $DEPLOY_CHANNEL # Default value is in app/pom.xml
if: startsWith(github.ref, 'refs/tags/1.2-')
- name: π¨ Compile the app
run: bash build.sh compile
- name: π Upload the app jar
uses: actions/upload-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target/Caffeinated.jar
bundle_windows:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: [self-hosted, Windows, x64, code-sign]
steps:
- name: π© Grab the code
uses: actions/checkout@v3
- name: π© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: ποΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: π¦ Create the Windows bundle
run: bash build.sh dist-windows
- name: π Upload the Windows x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-windows-x86_64.zip
path: dist/artifacts/Casterlabs-Caffeinated-windows-x86_64.zip
bundle_macos:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: ubuntu-latest
steps:
- name: π© Grab the code
uses: actions/checkout@v3
- name: π© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: ποΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: π¦ Create the macOS bundles
run: bash build.sh dist-macos
- name: π Upload the macOS aarch64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-aarch64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-macos-aarch64.tar.gz
- name: π Upload the macOS x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-macos-x86_64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-macos-x86_64.tar.gz
bundle_gnulinux:
needs: [build_app]
if: startsWith(github.ref, 'refs/tags/1.2-')
runs-on: ubuntu-latest
steps:
- name: π© Grab the code
uses: actions/checkout@v3
- name: π© Download the app artifact
uses: actions/download-artifact@v4
with:
name: Caffeinated.jar
path: app/core/target
- name: ποΈ Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
cache: maven
- name: π¦ Create the GNU/Linux bundles
run: bash build.sh dist-linux
- name: π Upload the GNU/Linux aarch64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
- name: π Upload the GNU/Linux arm bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-arm.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-arm.tar.gz
- name: π Upload the GNU/Linux x86_64 bundle to GitHub
uses: actions/upload-artifact@v4
with:
name: Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
path: dist/artifacts/Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
# dist:
# needs: [bundle_windows, bundle_macos, bundle_gnulinux]
# if: startsWith(github.ref, 'refs/tags/1.2-')
# runs-on: ubuntu-latest
# environment: "Caffeinated Deploy"
# steps:
# - name: π© Grab the code
# uses: actions/checkout@v3
# - name: ποΈ Set up JDK 11
# uses: actions/setup-java@v3
# with:
# java-version: 11
# distribution: temurin
# cache: maven
# - name: ποΈ Set deploy channel env
# run: echo "DEPLOY_CHANNEL=${{ (github.event.release.prerelease && 'beta') || 'stable' }}" >> $GITHUB_ENV && echo $DEPLOY_CHANNEL # Default value is in app/pom.xml
# if: startsWith(github.ref, 'refs/tags/1.2-')
# - name: π¨ Compile the deploy helper.
# run: cd deploy-helper && bash ./mvnw clean package
# - name: π© Download the Windows x86_64 bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-windows-x86_64.zip
# path: ./
# - name: π© Download the macOS aarch64 bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-macos-aarch64.tar.gz
# path: ./
# - name: π© Download the macOS x86_64 bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-macos-x86_64.tar.gz
# path: ./
# - name: π© Download the GNU/Linux aarch64 bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
# path: ./
# - name: π© Download the GNU/Linux arm bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-gnulinux-arm.tar.gz
# path: ./
# - name: π© Download the GNU/Linux x86_64 bundle
# uses: actions/download-artifact@v4
# with:
# name: Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz
# path: ./
# - name: π Deploy the app.
# env:
# BB_BUCKET_ID: ${{ secrets.BB_BUCKET_ID }}
# BB_CLIENT_ID: ${{ secrets.BB_CLIENT_ID }}
# BB_CLIENT_KEY: ${{ secrets.BB_CLIENT_KEY }}
# run: >-
# java -jar deploy-helper/target/deploy-helper.jar
# Casterlabs-Caffeinated-windows-x86_64.zip
# Casterlabs-Caffeinated-macos-aarch64.tar.gz
# Casterlabs-Caffeinated-macos-x86_64.tar.gz
# Casterlabs-Caffeinated-gnulinux-aarch64.tar.gz
# Casterlabs-Caffeinated-gnulinux-arm.tar.gz
# Casterlabs-Caffeinated-gnulinux-x86_64.tar.gz