Release #31
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: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Release version' | |
| required: true | |
| jobs: | |
| build-installer: | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| VERSION: ${{ github.event.inputs.version }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| mill-module: ubuntu | |
| installer-name: flatmark_${{ github.event.inputs.version }}_amd64.deb | |
| artifact-name: flatmark-installer-deb-x64 | |
| # macos is hardcoded to 1.0.0 for now | |
| - os: macos-latest | |
| mill-module: macos | |
| installer-name: flatmark-1.0.0.pkg | |
| artifact-name: flatmark-installer-macos-arm64 | |
| - os: windows-latest | |
| mill-module: windows | |
| installer-name: flatmark-${{ github.event.inputs.version }}.0.msi | |
| artifact-name: flatmark-installer-windows-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'zulu' | |
| java-version: 24 | |
| - run: | | |
| ./mill -i show cli.${{ matrix.mill-module }}.jpackageAppImage2 | |
| - name: Upload ${{ matrix.artifact-name }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact-name }} | |
| path: out/cli/${{ matrix.mill-module }}/jpackageAppImage2.dest/image/${{ matrix.installer-name }} | |
| retention-days: 1 | |
| build-assembly-jar: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 11 | |
| - run: | | |
| ./mill -i cli.jvm.assembly | |
| cp out/cli/jvm/assembly.dest/out.jar flatmark | |
| cp out/cli/jvm/assembly.dest/out.jar flatmark.bat | |
| - name: Archive executable-jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flatmark-executable-jar | |
| path: flatmark | |
| retention-days: 30 | |
| - name: Archive executable-jar-windows | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: flatmark-executable-jar-windows | |
| path: flatmark.bat | |
| retention-days: 1 | |
| build-native-executable: | |
| if: false | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| original-exe-name: native-executable | |
| exe-name: flatmark | |
| artifact-name: flatmark-ubuntu-x64 | |
| - os: macos-latest | |
| original-exe-name: native-executable | |
| exe-name: flatmark | |
| artifact-name: flatmark-macos-arm64 | |
| - os: windows-latest | |
| original-exe-name: native-executable.exe | |
| exe-name: flatmark.exe | |
| artifact-name: flatmark-windows-x64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: 21 | |
| - run: | | |
| ./mill -i cli.jvm.nativeImage2 | |
| cp out/cli/jvm/nativeImage2.dest/${{ matrix.original-exe-name }} ${{ matrix.exe-name }} | |
| - name: Archive native-executable | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact-name }} | |
| path: ${{ matrix.exe-name }} | |
| retention-days: 1 | |
| release: | |
| needs: [build-installer, build-assembly-jar] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: main | |
| fetch-depth: 0 | |
| - name: Download artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: flatmark-* | |
| merge-multiple: true | |
| path: release-artifacts | |
| - name: Release ${{ github.event.inputs.version }} | |
| uses: jreleaser/release-action@v2 | |
| with: | |
| arguments: full-release | |
| env: | |
| JRELEASER_PROJECT_VERSION: ${{ github.event.inputs.version }} | |
| JRELEASER_OUTPUT_DIRECTORY: jreleaser_out | |
| JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: JReleaser output | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| retention-days: 1 | |
| name: jreleaser-release | |
| path: | | |
| jreleaser_out/jreleaser/trace.log | |
| jreleaser_out/jreleaser/output.properties |