diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac7e4aa66c..63e86e0bdf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,15 +15,6 @@ on: description: "Semver version injected into packaged artifacts (example: 0.1.0)" required: true type: string - arch: - description: "macOS architecture to build" - required: true - default: arm64 - type: choice - options: - - arm64 - - x64 - - universal draft: description: "Create release as draft" required: true @@ -43,9 +34,15 @@ concurrency: cancel-in-progress: false jobs: - build-and-release: - name: Build, Package, and Publish + build-macos: + name: Build and package macOS (${{ matrix.arch }}) runs-on: macos-14 + strategy: + fail-fast: false + matrix: + arch: + - arm64 + - x64 env: CI: "true" steps: @@ -77,7 +74,7 @@ jobs: - name: Build and package macOS artifact run: | - bun run dist:desktop:dmg -- --arch "${{ inputs.arch }}" --version "${{ inputs.version }}" + bun run dist:desktop:dmg -- --arch "${{ matrix.arch }}" --version "${{ inputs.version }}" ls -lah release # TODO: Add production macOS signing and notarization in CI: # - Import Developer ID Application certificate + private key into keychain. @@ -93,10 +90,22 @@ jobs: - name: Upload packaged artifacts to workflow run uses: actions/upload-artifact@v4 with: - name: release-assets-${{ inputs.tag }}-${{ inputs.arch }} + name: release-assets-${{ inputs.tag }}-${{ matrix.arch }} path: release/* if-no-files-found: error + publish-release: + name: Create GitHub release + runs-on: ubuntu-latest + needs: build-macos + steps: + - name: Download packaged artifacts + uses: actions/download-artifact@v4 + with: + pattern: release-assets-${{ inputs.tag }}-* + merge-multiple: true + path: release-assets + - name: Create GitHub release and upload assets uses: softprops/action-gh-release@v2 with: @@ -105,7 +114,7 @@ jobs: draft: ${{ inputs.draft }} prerelease: ${{ inputs.prerelease }} generate_release_notes: true - files: release/* + files: release-assets/* env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # TODO: Add a multi-platform release matrix and publish Linux/Windows installers: