From 2a7810f463ddfe5e729ca6cf2dbcc56acb5667e6 Mon Sep 17 00:00:00 2001 From: frectonz Date: Thu, 20 Jun 2024 01:26:41 +0300 Subject: [PATCH] fix: use a plan job --- .github/workflows/release.yml | 17 ++++++----------- Cargo.toml | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dbf532b..5d0de3a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -80,12 +80,17 @@ jobs: name: artifacts-plan-dist-manifest path: plan-dist-manifest.json + custom-build-ui: + uses: ./.github/workflows/build-ui.yml + secrets: inherit + # Build and packages all the platform-specific things build-local-artifacts: name: build-local-artifacts (${{ join(matrix.targets, ', ') }}) # Let the initial task tell us to not run (currently very blunt) needs: - plan + - custom-build-ui if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }} strategy: fail-fast: false @@ -194,24 +199,14 @@ jobs: path: | ${{ steps.cargo-dist.outputs.paths }} ${{ env.BUILD_MANIFEST_NAME }} - - custom-build-ui: - needs: - - plan - - build-local-artifacts - uses: ./.github/workflows/build-ui.yml - with: - plan: ${{ needs.plan.outputs.val }} - secrets: inherit # Determines if we should publish/announce host: needs: - plan - build-local-artifacts - build-global-artifacts - - custom-build-ui # Only run if we're "publishing", and only if local and global didn't fail (skipped is fine) - if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.custom-build-ui.result == 'skipped' || needs.custom-build-ui.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} + if: ${{ always() && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} runs-on: "ubuntu-20.04" diff --git a/Cargo.toml b/Cargo.toml index cc8eb6e..fec7bbe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,5 +50,5 @@ targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux- pr-run-mode = "plan" # Whether to install an updater program install-updater = true -# Global artifacts jobs to run in CI -global-artifacts-jobs = ["./build-ui"] +# Plan jobs to run in CI +plan-jobs = ["./build-ui"]