1.15.1 #49
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
# This workflow will build a Java project with Gradle | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle | |
name: Build for Windows | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 18 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: '18' | |
- name: Get Latest Release | |
id: release | |
uses: InsonusK/[email protected] | |
with: | |
myToken: ${{ secrets.GITHUB_TOKEN }} | |
view_top: 1 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Cache Gradle | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-windows-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle-windows- | |
- name: Build with Gradle | |
run: | | |
./gradlew createDistributable | |
./gradlew --stop | |
- name: Upload Logs | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: logs | |
path: ${{ github.workspace }}\desktop\build\compose\logs\ | |
- name: Check Output Exists | |
run: dir -s ${{ github.workspace }}\desktop\build\compose\binaries\main\app\ | |
- name: Create Release ZIP | |
uses: papeloto/action-zip@v1 | |
with: | |
dest: 'Bifrost_Windows.zip' | |
files: desktop\build\compose\binaries\main\app\ | |
- name: Upload Windows Executable | |
if: ${{ always() }} | |
uses: actions/[email protected] | |
with: | |
name: Bifrost | |
path: ${{ github.workspace }}\desktop\build\compose\binaries\main\app\Bifrost\ | |
- name: Upload Release ZIP | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: 'Bifrost_Windows.zip' | |
token: ${{ secrets.GITHUB_TOKEN }} | |
allowUpdates: true | |
replacesArtifacts: false | |
omitBodyDuringUpdate: true | |
tag: ${{ steps.release.outputs.tag_name }} |