diff --git a/.github/workflows/build-installer.yml b/.github/workflows/build-installer.yml new file mode 100644 index 0000000..4bc02d6 --- /dev/null +++ b/.github/workflows/build-installer.yml @@ -0,0 +1,103 @@ +name: Release + +on: + workflow_dispatch: + push: + tags: + - "v*" + +jobs: + build-windows-installer-msi: + name: Build Windows x64 installer (MSI) + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check gradle wrapper + uses: gradle/actions/wrapper-validation@v4 + + - name: Set up JDK 24 + uses: graalvm/setup-graalvm@v1 + with: + java-version: '24' + distribution: 'temurin' + cache: gradle + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with JPackage + run: .\gradlew.bat jpackage + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + path: ./app/build/distributions/Replay Reader-*.msi + name: windows-installer-msi + retention-days: 1 + + build-windows-installer-portable: + name: Build Windows x64 installer (Portable) + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Check gradle wrapper + uses: gradle/actions/wrapper-validation@v4 + + - name: Set up JDK 24 + uses: graalvm/setup-graalvm@v1 + with: + java-version: '24' + distribution: 'temurin' + cache: gradle + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build with JPackage + run: .\gradlew.bat jpackage -P"jpackage.portable=true" + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + path: ./app/build/distributions/Replay Reader-*.msi + name: windows-installer-msi + retention-days: 1 + + create-release: + name: Create release + runs-on: ubuntu-latest + needs: + - build-windows-installer-msi + - build-windows-installer-portable + steps: + - name: Download Windows x64 installer (MSI) + uses: actions/download-artifact@v4 + with: + name: windows-installer-msi + + - name: Download Windows x64 installer (Portable) + uses: actions/download-artifact@v4 + with: + name: windows-installer-portable + + - name: Generate checksum + uses: jmgilman/actions-generate-checksum@v1 + with: + patterns: | + *.msi + *.zip + + - name: Create Github release + uses: softprops/action-gh-release@v2 + with: + files: + checksum.txt + *.msi + *.zip + token: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/build.gradle b/build.gradle index 51e535c..943fd80 100644 --- a/build.gradle +++ b/build.gradle @@ -6,7 +6,7 @@ plugins { } group = 'com.synops' -version = '0.0.1-SNAPSHOT' +version = '1.0.0' java { toolchain {