Release #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |