diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 888298258..c499f9584 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -284,16 +284,16 @@ jobs: steps: - name: Checkout - if: fromJSON(matrix.config.container).image == null + if: fromJSON(matrix.config.container) == null uses: actions/checkout@v4 - name: Checkout # actions/checkout@v4 has dependency on a higher version of glibc than available in the Linux container. - if: fromJSON(matrix.config.container).image != null + if: fromJSON(matrix.config.container) != null uses: actions/checkout@v3 - name: Install Node.js - if: fromJSON(matrix.config.container).image == null + if: fromJSON(matrix.config.container) == null uses: actions/setup-node@v3 with: node-version: ${{ env.NODE_VERSION }} @@ -301,10 +301,10 @@ jobs: cache: 'yarn' - name: Install Python 3.x - if: fromJSON(matrix.config.container).image == null + if: fromJSON(matrix.config.container) == null uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: '3.11.x' - name: Install Go uses: actions/setup-go@v4 @@ -452,24 +452,6 @@ jobs: name: ${{ env.JOB_TRANSFER_ARTIFACT }} path: ${{ env.CHANNEL_FILES_PATH }} - # This job serves only as a container for the logic necessary to allow dependent jobs to run if the - # merge-channel-files job was skipped. - merge-channel-files-complete: - needs: - - merge-channel-files - if: > - always() && - ( - needs.merge-channel-files.result == 'skipped' || - needs.merge-channel-files.result == 'success' - ) - runs-on: ubuntu-latest - permissions: {} - steps: - # GitHub Actions requires every job to have >=1 step. - - name: Dummy step - run: '' - artifacts: name: ${{ matrix.artifact.name }} artifact needs: @@ -546,9 +528,16 @@ jobs: publish: needs: - build-type-determination - - merge-channel-files-complete + - merge-channel-files - changelog if: > + always() && + needs.build-type-determination.result == 'success' && + ( + needs.merge-channel-files.result == 'skipped' || + needs.merge-channel-files.result == 'success' + ) && + needs.changelog.result == 'success' && needs.build-type-determination.outputs.publish-to-s3 == 'true' && needs.build-type-determination.outputs.is-nightly == 'true' runs-on: ubuntu-latest @@ -572,9 +561,17 @@ jobs: release: needs: - build-type-determination - - merge-channel-files-complete + - merge-channel-files - changelog - if: needs.build-type-determination.outputs.is-release == 'true' + if: > + always() && + needs.build-type-determination.result == 'success' && + ( + needs.merge-channel-files.result == 'skipped' || + needs.merge-channel-files.result == 'success' + ) && + needs.changelog.result == 'success' && + needs.build-type-determination.outputs.is-release == 'true' runs-on: ubuntu-latest steps: - name: Download [GitHub Actions] @@ -598,13 +595,6 @@ jobs: file_glob: true body: ${{ needs.changelog.outputs.BODY }} - # Temporary measure to prevent release update offers before the manually produced builds are uploaded. - # The step must be removed once fully automated builds are regained. - - name: Remove "channel update info files" related to manual builds - run: | - # See: https://github.com/arduino/arduino-ide/issues/2018 - rm "${{ env.JOB_TRANSFER_ARTIFACT }}/stable-linux.yml" - - name: Publish Release [S3] if: needs.build-type-determination.outputs.publish-to-s3 == 'true' uses: docker://plugins/s3