Desktop Build #70
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: Desktop Build | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'microsoft' | |
| java-version: '21' | |
| - name: Get Latest Release | |
| id: release | |
| uses: pozetroninc/github-action-get-latest-release@master | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| repository: ${{ github.repository }} | |
| - name: Retrieve macOS Certificate | |
| env: | |
| CERTIFICATE_BASE64: ${{ secrets.MACOS_CERTIFICATE }} | |
| run: | | |
| echo $CERTIFICATE_BASE64 | base64 --decode > macos.cer | |
| - 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-desktop-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-gradle-desktop- | |
| - name: Build with Gradle | |
| id: gradle-build | |
| run: | | |
| ./gradlew :desktop:build | |
| ./gradlew --stop | |
| - name: Download Conveyor | |
| shell: bash | |
| run: | | |
| wget https://downloads.hydraulic.dev/conveyor/conveyor-15.0-mac-aarch64.zip | |
| unzip conveyor-15.0-mac-aarch64.zip | |
| - name: Run Conveyor | |
| shell: bash | |
| env: | |
| SIGNING_KEY: ${{ secrets.SIGNING_KEY }} | |
| CONVEYOR_AGREE_TO_LICENSE: 1 | |
| run: | | |
| PATH="$PATH:./Conveyor.app/Contents/MacOS" | |
| conveyor \ | |
| "-Kapp.signing-key=${{ secrets.SIGNING_KEY }}" \ | |
| "-Kapp.mac.certificate=macos.cer" \ | |
| "-Kapp.mac.notarization.team-id=${{ secrets.MACOS_TEAM_ID }}" \ | |
| "-Kapp.mac.notarization.app-specific-password=${{ secrets.MACOS_APP_PASSWORD }}" \ | |
| "-Kapp.mac.notarization.apple-id=${{ secrets.APPLE_ID }}" \ | |
| make site | |
| - name: Upload Release Files | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| artifacts: 'output/*' | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| allowUpdates: true | |
| replacesArtifacts: false | |
| omitBodyDuringUpdate: true | |
| tag: ${{ steps.release.outputs.release }} | |
| deploy: | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download release | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| latest: true | |
| out-file-path: '.' | |
| fileName: '*' | |
| - name: Shortcut HTML file | |
| run: ln -s download.html index.html | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Upload entire repository | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |