Skip to content

Update publish workflows#770

Open
mkernohanbc wants to merge 8 commits into
mainfrom
ci/publish-workflows
Open

Update publish workflows#770
mkernohanbc wants to merge 8 commits into
mainfrom
ci/publish-workflows

Conversation

@mkernohanbc

Copy link
Copy Markdown
Contributor

This PR refactors the publish workflows for @bcgov/design-system-react-components and @bcgov/design-tokens with the changes from #762 and #763. It also removes the test workflows added in #762.

This change moves duplicated steps from the four publish jobs into a unified build job, that runs before the publish jobs. The build job installs dependencies and generates a build artifact, which it uploads via @actions/upload-artifact.

The publish jobs retrieve the build artifact via @actions/download-artifact, and then publish to their respective target registries with the correct dist-tag.

@mkernohanbc mkernohanbc self-assigned this Jun 29, 2026
@mkernohanbc mkernohanbc requested a review from a team as a code owner June 29, 2026 21:31
@mkernohanbc mkernohanbc added react-components Changes or issues affecting the design-system-react-components package design-tokens Changes or issues affecting the design-tokens package maintenance Housekeeping and admin labels Jun 29, 2026
@mkernohanbc mkernohanbc requested a review from ty2k June 29, 2026 21:33
@ty2k ty2k requested a review from Copilot July 2, 2026 20:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the package publish GitHub Actions workflows for @bcgov/design-system-react-components and @bcgov/design-tokens by introducing a shared build job that produces an artifact consumed by subsequent registry-specific publish jobs, and removes the temporary test publish workflows introduced in earlier PRs.

Changes:

  • Removed the temporary test workflows for publishing tokens/components.
  • Added a build job to each publish workflow to install deps, build, and upload an artifact.
  • Updated publish jobs to download the build artifact and publish with the appropriate dist-tags/registries.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.

File Description
.github/workflows/test_publish_react_component_library.yaml Removes temporary test workflow used to validate the publish refactor approach.
.github/workflows/test_publish_design_tokens.yaml Removes temporary test workflow used to validate the publish refactor approach.
.github/workflows/publish_react_component_library.yaml Introduces a shared build job and switches publish jobs to consume a downloaded artifact (plus adds Figma Code Connect publish on releases).
.github/workflows/publish_design_tokens.yaml Introduces a shared build job and switches publish jobs to consume a downloaded artifact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +80 to 85
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: react-components-build
path: packages/react-components

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears totally contradictory with previously-observed job failure: https://github.com/bcgov/design-system/actions/runs/28268823077/job/83761783124

Comment on lines +104 to 109
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: react-components-build
path: packages/react-components

Comment on lines +131 to 136
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: react-components-build
path: packages/react-components

Comment on lines +155 to 160
- name: Download build artifact
uses: actions/download-artifact@v4
with:
node-version: ${{ env.GITHUB_NVMRC_VERSION }}
name: react-components-build
path: packages/react-components

Comment on lines +76 to +81
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: design-tokens-build
path: packages/design-tokens/dist

Comment on lines +101 to +106
- name: Download build artifact
uses: actions/download-artifact@v4
with:
node-version: ${{ env.GITHUB_NVMRC_VERSION }}

- name: Install dependencies
run: npm install
working-directory: ./packages/design-tokens

- name: Install jq
run: sudo apt-get install -y jq

- name: Run build script
run: npm run build
working-directory: ./packages/design-tokens

# After dependencies are installed and build is complete, change registry to GitHub Packages
- name: Rerun Node.js setup for GitHub Packages publishing
name: design-tokens-build
path: packages/design-tokens/dist
- name: Set up Node.js
Comment on lines +128 to 133
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: design-tokens-build
path: packages/design-tokens/dist

Comment on lines +153 to 158
- name: Download build artifact
uses: actions/download-artifact@v4
with:
node-version: ${{ env.GITHUB_NVMRC_VERSION }}
name: design-tokens-build
path: packages/design-tokens/dist

Comment on lines 21 to 23
- name: Checkout code
uses: actions/checkout@v6

Comment on lines 29 to 33
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ env.GITHUB_NVMRC_VERSION }}
registry-url: "https://registry.npmjs.org/"
node-version: ${{ steps.nvmrc.outputs.version }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design-tokens Changes or issues affecting the design-tokens package maintenance Housekeeping and admin react-components Changes or issues affecting the design-system-react-components package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants