Skip to content

Commit

Permalink
ci: migrate package archive uploading job to GHA
Browse files Browse the repository at this point in the history
Migrate the package archive uploading job from CircleCI to Github Actions

(cherry picked from commit 17f259d)
  • Loading branch information
josephperrott committed Oct 19, 2023
1 parent eceefd9 commit 6c424ba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 21 deletions.
21 changes: 0 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
# ----------------------------------------
Expand Down Expand Up @@ -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:
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 6c424ba

Please sign in to comment.