diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 12bb338db..e6f27275f 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -73,6 +73,7 @@ jobs: uses: ./actions/upload_prod_artefacts with: upload_prefix: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.pkg_to_build }} + multiarch_build: 'false' - name: Build & publish ${{ matrix.pkg_to_build }} # we want this to run only when on "push" to "master" @@ -110,18 +111,15 @@ jobs: uses: ./actions/upload_prod_artefacts with: upload_prefix: ${{ runner.os }}-${{ runner.arch }} + multiarch_build: 'false' - name: Build & publish # we want this to run only when on "push" to "master" if: ${{ env.SHOULD_PUBLISH == 'true' || env.SHOULD_PUBLISH_ALPHA == 'true' }} run: yarn build-release-publish # No other args needed for windows publish - # We want both arm64 and intel mac builds, and according to this https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources macos-14 and above is always arm64 and macos-13 is the last intel runner - build_macos_silicon: + build_macos: runs-on: macos-14 - strategy: - matrix: - arch: [arm64] env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} @@ -138,7 +136,7 @@ jobs: - name: Setup & Build uses: ./actions/setup_and_build with: - cache_suffix: ${{ runner.os }}-${{ matrix.arch }} + cache_suffix: ${{ runner.os }} # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) - name: Unit Test @@ -146,64 +144,26 @@ jobs: - name: Build but do not publish # we want this to run always, except on "push" to "master" - if: ${{ env.SHOULD_PUBLISH == 'false' }} + if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }} run: | source ./build/setup-mac-certificate.sh yarn build-release --config.mac.bundleVersion=${{ github.ref }} - - name: Upload artefacts + - name: Upload artefacts (arm64) # we want this to run always, except on "push" to "master" - if: ${{ env.SHOULD_PUBLISH == 'false' }} + if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }} uses: ./actions/upload_prod_artefacts with: - upload_prefix: ${{ runner.os }}-${{ matrix.arch }} + upload_prefix: mac-arm64 + multiarch_build: 'true' - - name: Build & publish - # we want this to run only when on "push" to "master" - if: ${{ env.SHOULD_PUBLISH == 'true' }} - run: | - source ./build/setup-mac-certificate.sh - yarn build-release-publish --config.mac.bundleVersion=${{ github.ref }} - build_macos_intel: - runs-on: macos-13 - strategy: - matrix: - arch: [x64] - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - MAC_CERTIFICATE: ${{ secrets.MAC_CERTIFICATE }} - MAC_CERTIFICATE_PASSWORD: ${{ secrets.MAC_CERTIFICATE_PASSWORD }} - SIGNING_APPLE_ID: ${{ secrets.SIGNING_APPLE_ID }} - SIGNING_APP_PASSWORD: ${{ secrets.SIGNING_APP_PASSWORD }} - SIGNING_TEAM_ID: ${{ secrets.SIGNING_TEAM_ID }} - steps: - - run: git config --global core.autocrlf false - - - name: Checkout git repo - uses: actions/checkout@v4 - - - name: Setup & Build - uses: ./actions/setup_and_build - with: - cache_suffix: ${{ runner.os }}-${{ matrix.arch }} - - # we want to test on all platforms since some are testing the rendered menus (and are dependent on the platform) - - name: Unit Test - run: yarn test - - - name: Build but do not publish - # we want this to run always, except on "push" to "master" - if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }} - run: | - source ./build/setup-mac-certificate.sh - yarn build-release --config.mac.bundleVersion=${{ github.ref }} - - - name: Upload artefacts + - name: Upload artefacts (x64) # we want this to run always, except on "push" to "master" if: ${{ env.SHOULD_PUBLISH == 'false' && env.SHOULD_PUBLISH_ALPHA == 'false' }} uses: ./actions/upload_prod_artefacts with: - upload_prefix: ${{ runner.os }}-${{ matrix.arch }} + upload_prefix: mac-x64 + multiarch_build: 'true' - name: Build & publish # we want this to run only when on "push" to "master" diff --git a/actions/upload_prod_artefacts/action.yml b/actions/upload_prod_artefacts/action.yml index 2e9542f92..b42af3ead 100644 --- a/actions/upload_prod_artefacts/action.yml +++ b/actions/upload_prod_artefacts/action.yml @@ -4,6 +4,9 @@ inputs: upload_prefix: description: 'upload name prefix' required: true + multiarch_build: + description: 'build folder contains multiple architectures' + required: true runs: using: 'composite' @@ -15,8 +18,29 @@ runs: shell: bash working-directory: ./release/ - - name: Remaining files - run: ls . + - name: Make artefacts folder + run: mkdir -p ${{ inputs.upload_prefix }}-production + shell: bash + working-directory: ./release/ + + - name: Move all files + if: ${{ inputs.multiarch_build == 'false' }} + run: | + ls -f -- | xargs -I{} mv {} ${{ inputs.upload_prefix }}-production/" + shell: bash + working-directory: ./release/ + + - name: Move ${{ inputs.upload_prefix }} files + if: ${{ inputs.multiarch_build == 'true' }} + run: | + mv *${{ inputs.upload_prefix }}* ${{ inputs.upload_prefix }}-production/ + mv builder-debug.yml ${{ inputs.upload_prefix }}-production/ + mv *latest*.yml ${{ inputs.upload_prefix }}-production/ + shell: bash + working-directory: ./release/ + + - name: Artefact files + run: ls ${{ inputs.upload_prefix }}-production/ shell: bash working-directory: ./release/ @@ -24,4 +48,4 @@ runs: uses: actions/upload-artifact@v4 with: name: ${{ inputs.upload_prefix }}-production - path: release + path: release/${{ inputs.upload_prefix }}-production/