-
Notifications
You must be signed in to change notification settings - Fork 7
87 lines (75 loc) · 2.78 KB
/
release.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
84
85
86
87
name: Release
on:
release:
types:
- published
jobs:
release:
runs-on: windows-latest
steps:
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Check out git repository
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
distribution: liberica
java-version: 21
- name: Build
shell: bash
run: |
sed -i "s/0\.0\.0/${{ github.event.release.tag_name }}/" gradle.properties
sed -i "s/--add-exports=java.desktop\/com.apple.eawt.event=ALL-UNNAMED//" release-bin/.vmoptions
mkdir package
./gradlew :daw:shadowJar
env:
APP_CENTER_SECRET: ${{ secrets.APP_CENTER_SECRET }}
- name: Upload jar to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: daw/build/libs/daw.jar
asset_name: EchoInMirror-win64.jar
tag: ${{ github.ref }}
- name: Copy files
shell: bash
run: |
cp daw/build/libs/daw.jar package/EchoInMirror.jar
cp -R release-bin/* package/
curl https://github.com/EchoInMirror/EIMHost/releases/latest/download/EIMHost-x86.exe -o package/EIMHost-x86.exe -L
curl https://github.com/EchoInMirror/EIMHost/releases/latest/download/EIMHost-x64.exe -o package/EIMHost.exe -L
- name: Download ffmpeg
shell: bash
run: |
curl https://github.com/BtbN/FFmpeg-Builds/releases/download/latest/ffmpeg-master-latest-win64-gpl.zip -O -L
unzip ffmpeg-master-latest-win64-gpl.zip
mkdir package/ffmpeg
mv ffmpeg-master-latest-win64-gpl/bin/ffmpeg.exe package/ffmpeg/ffmpeg.exe
- name: Download bellsoft jre
shell: bash
run: |
curl https://download.bell-sw.com/java/21.0.1+12/bellsoft-jre21.0.1+12-windows-amd64.zip -O -L
unzip -d ./package bellsoft-jre21.0.1+12-windows-amd64.zip
mv package/jre-21.0.1 package/jre
- name: Package
run: |
cp LICENSE package/LICENSE
mv package EchoInMirror
Compress-Archive -Path EchoInMirror -DestinationPath EchoInMirror.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: EchoInMirror.zip
asset_name: EchoInMirror-win64.zip
tag: ${{ github.ref }}
- name: Stop gradle
shell: bash
run: ./gradlew --stop