From 1c9f7dcb6c8412a467e26fd71cd1fcdcd266a69f Mon Sep 17 00:00:00 2001 From: PikachuEXE Date: Thu, 5 Dec 2024 02:11:57 +0800 Subject: [PATCH] * Update build workflow to add back osx-arm64 (#6157) --- .github/workflows/build.yml | 39 +++++++++++++---------- .github/workflows/release.yml | 59 ++++++++++++++++++++--------------- 2 files changed, 56 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index cccd90a7479f9..4293cc2588668 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,7 @@ jobs: - win-x64 - win-arm64 - osx-x64 - # `osx-arm64` disabled due to "macOS gatekeeper" - # See details in https://github.com/FreeTubeApp/FreeTube/pull/2113 - # - osx-arm64 + - osx-arm64 include: - runtime: linux-x64 os: ubuntu-latest @@ -36,8 +34,8 @@ jobs: - runtime: osx-x64 os: macOS-latest -# - runtime: osx-arm64 -# os: macOS-latest + - runtime: osx-arm64 + os: macOS-latest - runtime: win-x64 os: windows-latest @@ -300,12 +298,12 @@ jobs: name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg -# - name: Upload Mac arm64 .dmg Artifact -# uses: actions/upload-artifact@v4 -# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') -# with: -# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg -# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg + - name: Upload Mac arm64 .dmg Artifact + uses: actions/upload-artifact@v4 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg - name: Upload Mac x64 .zip Artifact uses: actions/upload-artifact@v4 @@ -321,9 +319,16 @@ jobs: name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-mac.7z -# - name: Upload Mac arm64 .zip Artifact -# uses: actions/upload-artifact@v4 -# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') -# with: -# name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.zip -# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.zip + - name: Upload Mac arm64 .zip Artifact + uses: actions/upload-artifact@v4 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.zip + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.zip + + - name: Upload Mac arm64 .7z Artifact + uses: actions/upload-artifact@v4 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + with: + name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.7z + path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.7z diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 572fcab1a55df..e7cf8af1603fd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,9 +20,7 @@ jobs: - win-x64 - win-arm64 - osx-x64 - # `osx-arm64` disabled due to "macOS gatekeeper" - # See details in https://github.com/FreeTubeApp/FreeTube/pull/2113 - # - osx-arm64 + - osx-arm64 include: - runtime: linux-x64 os: ubuntu-latest @@ -36,8 +34,8 @@ jobs: - runtime: osx-x64 os: macOS-latest -# - runtime: osx-arm64 -# os: macOS-latest + - runtime: osx-arm64 + os: macOS-latest - runtime: win-x64 os: windows-latest @@ -306,16 +304,16 @@ jobs: asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}.dmg asset_content_type: application/x-apple-diskimage -# - name: Upload Mac arm64 .dmg Release -# uses: actions/upload-release-asset@v1 -# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} -# asset_name: freetube-${{ steps.getPackageInfo.outputs.version }}-mac-arm64.dmg -# asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-arm64.dmg -# asset_content_type: application/x-apple-diskimage + - name: Upload Mac arm64 .dmg Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ steps.getPackageInfo.outputs.version }}-mac-arm64.dmg + asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-arm64.dmg + asset_content_type: application/x-apple-diskimage - name: Upload Mac x64 .zip Release uses: actions/upload-release-asset@v1 @@ -339,13 +337,24 @@ jobs: asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-mac.7z asset_content_type: application/x-7z-compressed -# - name: Upload Mac arm64 .zip Release -# uses: actions/upload-release-asset@v1 -# if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} -# asset_name: freetube-${{ steps.getPackageInfo.outputs.version }}-mac-arm64.zip -# asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-arm64-mac.zip -# asset_content_type: application/x-apple-diskimage + - name: Upload Mac arm64 .zip Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ steps.getPackageInfo.outputs.version }}-mac-arm64.zip + asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-arm64-mac.zip + asset_content_type: application/x-apple-diskimage + + - name: Upload Mac arm64 .7z Release + uses: actions/upload-release-asset@v1 + if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: https://uploads.github.com/repos/FreeTubeApp/FreeTube/releases/${{ secrets.UPLOAD_ID }}/assets{?name,label} + asset_name: freetube-${{ steps.getPackageInfo.outputs.version }}-mac-arm64.7z + asset_path: build/freetube-${{ steps.getPackageInfo.outputs.version }}-arm64-mac.7z + asset_content_type: application/x-7z-compressed