From 17f259da357b7f9e2ba413dcfadd754467eb9494 Mon Sep 17 00:00:00 2001 From: Joey Perrott Date: Fri, 6 Oct 2023 19:11:02 +0000 Subject: [PATCH] ci: migrate package archive uploading job to GHA Migrate the package archive uploading job from CircleCI to Github Actions --- .circleci/config.yml | 21 --------------------- .github/workflows/ci.yml | 26 ++++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 29fe19cd1f2a..01b7b5f4acac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,21 +197,6 @@ jobs: - 'releases/**/*' - *slack_notify_on_failure - upload_release_packages: - <<: *job_defaults - steps: - - checkout_and_rebase - - *restore_cache - - *attach_release_output - - *yarn_install - - # Creates package archives and passes in an appropriate meaningful archive suffix. The - # suffix consists of the pull request number and a short SHA describing the current `HEAD`. - - run: ./scripts/create-package-archives.js --suffix "pr$CIRCLE_PR_NUMBER-$(git rev-parse --short HEAD)" - # Upload archives to the CircleCI job artifacts. - - store_artifacts: - path: dist/release-archives - # ---------------------------------------- # Job that publishes the docs site # ---------------------------------------- @@ -246,12 +231,6 @@ workflows: jobs: - build_release_packages: filters: *ignore_presubmit_branch_filter - - upload_release_packages: - # We don't want to run this job on push builds because for those, the - # `publish_snapshots` runs, and publishes build artifacts. - filters: *only_on_pull_requests_filter - requires: - - build_release_packages - deploy_docs_site: filters: *publish_branches_filter requires: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 349e831d7c2d..e2db2466c572 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -270,3 +270,29 @@ jobs: slack-message: 'Snapshot publishing failed for ${{ github.base_ref }} branch failed on build ${{ github.event.after }}: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}' env: SLACK_BOT_TOKEN: ${{ secrets.ANGULAR_ROBOT_SLACK_TOKEN }} + + upload_package_artifacts: + if: ${{ github.event_name != 'push'}} + runs-on: ubuntu-latest-4core + steps: + - name: Initialize environment + uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@9931e1a8d1b62fcd2267e89f9993a494856cc1cd + with: + cache-node-modules: true + - name: Setup Bazel + uses: angular/dev-infra/github-actions/bazel/setup@9931e1a8d1b62fcd2267e89f9993a494856cc1cd + - name: Setup Bazel RBE + uses: angular/dev-infra/github-actions/bazel/configure-remote@9931e1a8d1b62fcd2267e89f9993a494856cc1cd + - name: Install node modules + run: yarn install --frozen-lockfile + - name: Build and Verify Release Output + run: yarn build-and-check-release-output + - name: Verify tooling setup + run: yarn check-tooling-setup + - name: Build and create package artifacts + run: ./scripts/create-package-archives.js --suffix "pr${{github.event.number}}-$(git rev-parse --short HEAD)" + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: Package Artifacts + path: dist/release-archives