Update release.yml but now on linux build the release #30
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| # additional permissions for provided GitHub token to create new release | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-release-win: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Sets GOM version | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const gomVersion = context.ref.split('/').pop().substring(1) | |
| core.exportVariable('GOM_VERSION', gomVersion); | |
| - name: Build a simple jar with all dependencies | |
| run: ./gradlew packageUberJarForCurrentOS | |
| - run: ls ./app/build/compose/jars/ | |
| - name: Save JRE bundle artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ format('got-{0}-win-x64.jar',env.GOM_VERSION) }} | |
| path: ${{ format('app/build/compose/jars/Gradle-Offline-Tools-windows-x64-{0}.jar',env.GOM_VERSION) }} | |
| if-no-files-found: error | |
| retention-days: 1 | |
| # build-release-mac: | |
| # needs: [build-release-win, build-release-ubuntu] | |
| # runs-on: mac-latest-large | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # - name: Set up JDK | |
| # uses: actions/setup-java@v5 | |
| # with: | |
| # distribution: temurin | |
| # java-version: 21 | |
| # | |
| # - name: Setup Gradle | |
| # uses: gradle/actions/setup-gradle@v5 | |
| # | |
| # - name: Sets GOM version | |
| # uses: actions/github-script@v8 | |
| # with: | |
| # script: | | |
| # const gomVersion = context.ref.split('/').pop().substring(1) | |
| # core.exportVariable('GOM_VERSION', gomVersion); | |
| # | |
| # - name: Build a simple jar with all dependencies | |
| # run: ./gradlew packageUberJarForCurrentOS | |
| # | |
| # - run: ls ./app/build/compose/jars/ | |
| # | |
| # - name: Save JRE bundle artifact | |
| # uses: actions/upload-artifact@v5 | |
| # with: | |
| # name: ${{ format('Gradle Offline Manager-macos-x64-{0}.jar',env.GOM_VERSION) }} | |
| # path: ${{ format('app/build/compose/jars/Gradle Offline Manager-macos-x64-{0}.jar',env.GOM_VERSION) }} | |
| # if-no-files-found: error | |
| # retention-days: 1 | |
| build-release-ubuntu: | |
| needs: build-release-win | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: temurin | |
| java-version: 21 | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| - name: Sets GOM version | |
| uses: actions/github-script@v8 | |
| with: | |
| script: | | |
| const gomVersion = context.ref.split('/').pop().substring(1) | |
| core.exportVariable('GOM_VERSION', gomVersion); | |
| - name: Build a simple jar with all dependencies | |
| run: ./gradlew packageUberJarForCurrentOS | |
| - run: ls ./app/build/libs | |
| - name: Save JRE bundle artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: ${{ format('got-{0}-linux-x64.jar',env.GOM_VERSION) }} | |
| path: ${{ format('app/build/compose/jars/Gradle-Offline-Tools-linux-x64-{0}.jar',env.GOM_VERSION) }} | |
| if-no-files-found: error | |
| retention-days: 1 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v6 | |
| - run: | | |
| mkdir release | |
| mv got-*.jar ./release/ | |
| cd release | |
| ls -l | |
| - name: Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: ${{ env.GOM_VERSION }} | |
| draft: true | |
| fail_on_unmatched_files: true | |
| files: | | |
| release/got-*.jar | |