name: CI on: push: tags: - v* concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: BuildBinaries: name: Build application packages strategy: matrix: runtime: [ linux-x64, linux-centos-x64, osx-x64, win-x64 ] include: - runtime: linux-x64 arch: x64 os: ubuntu-latest shell: bash build: packageUberJarForCurrentOS packageDeb setupCl: ./scripts/SetupClUnix.sh - runtime: linux-centos-x64 arch: x64 os: ubuntu-latest shell: bash build: packageRpm setupCl: ./scripts/SetupClUnix.sh - runtime: osx-x64 arch: x64 os: macOS-latest shell: bash build: packageUberJarForCurrentOS packageDmg notarizeDmg setupCl: ./scripts/SetupClUnix.sh - runtime: win-x64 arch: x64 os: windows-latest shell: powershell build: packageUberJarForCurrentOS packageMsi setupCl: ./scripts/SetupClWindows.ps1 runs-on: ${{ matrix.os }} timeout-minutes: 60 defaults: run: shell: ${{ matrix.shell }} steps: - uses: actions/checkout@v2 - uses: actions/setup-java@v1 if: ${{ matrix.runtime != 'linux-centos-x64' }} with: java-version: '15' architecture: ${{ matrix.arch }} - name: Setup Cl run: ${{ matrix.setupCl }} - name: Setup MacOS Keychain uses: apple-actions/import-codesign-certs@v1 if: ${{ matrix.runtime == 'osx-x64' }} with: p12-file-base64: ${{ secrets.APPLE_CERT }} p12-password: ${{ secrets.APPLE_CERT_PASSWORD }} - name: Build rpm Package if: ${{ matrix.runtime == 'linux-centos-x64' }} uses: Syer10/CentOS-Java15-Action@v1 with: command: ./gradlew ${{ matrix.build }} - name: Build if: ${{ matrix.runtime != 'linux-centos-x64' }} uses: gradle/gradle-build-action@v1 with: arguments: > ${{ matrix.build }} -Pcompose.desktop.mac.sign=true -Pcompose.desktop.mac.signing.identity=${{ secrets.APPLE_IDENTITY_SHORT }} -Pcompose.desktop.mac.notarization.appleID=${{ secrets.APPLE_ID }} -Pcompose.desktop.mac.notarization.password=${{ secrets.APPLE_PASSWORD }} -Pidentity="${{ secrets.APPLE_IDENTITY }}" distributions-cache-enabled: true dependencies-cache-enabled: true configuration-cache-enabled: true # Upload runner package tar.gz/zip as artifact - name: Publish Artifact uses: actions/upload-artifact@v2 with: name: runner-package-${{ matrix.runtime }} path: | build/compose/binaries/main/*/ build/compose/jars/ !build/compose/binaries/main/app/ # Upload runner errors - name: Upload error logs uses: actions/upload-artifact@v2 if: ${{ failure() }} with: name: runner-errors-${{ matrix.runtime }} path: | build/compose/logs/ ReleaseBinaries: name: Make a release needs: [BuildBinaries] runs-on: ubuntu-latest steps: - name: Download Build Artifacts uses: actions/download-artifact@v2 - uses: ncipollo/release-action@v1 with: artifacts: "*/binaries/main/*/*.*,*/jars/*.jar" draft: true token: ${{ secrets.GITHUB_TOKEN }}