Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 31, 2026

Updates the test workflow to generate and upload npm package artifacts.

Changes Made

Artifact Generation

  • Added rush pack step to generate package tarballs (.tgz files)
  • Added artifact upload step using actions/upload-artifact@v6
  • Restricted pack and upload steps to ubuntu-based runners only using contains(matrix.os, 'ubuntu')
  • Simplified artifact name to packages
  • Excluded everything under node_modules directories from artifact upload

Artifacts Produced

The workflow generates and uploads three npm package tarballs:

  • @microsoft.azure/openapi-validator
  • @microsoft.azure/openapi-validator-core
  • @microsoft.azure/openapi-validator-rulesets

These artifacts are uploaded only from the ubuntu runner to avoid duplication, with the upload step configured to fail if no .tgz files are found. Everything within node_modules directories is excluded from the upload.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI changed the title [WIP] Update test workflow to generate npm package tar.gz files Add npm package artifact generation to test workflow Jan 31, 2026
Copilot AI requested a review from mikeharder January 31, 2026 00:13
…ct name

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
@mikeharder
Copy link
Member

@copilot: While we're here, upgrade all actions in this file to their latest versions. Also, upgrade the node version from 22 to 24 (but keep using node 20).

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot: While we're here, upgrade all actions in this file to their latest versions. Also, upgrade the node version from 22 to 24 (but keep using node 20).

Done in 443966a - upgraded all actions from v4 to v6 (checkout, setup-node, upload-artifact) and changed Node version from 22 to 24.

Copilot AI changed the title Add npm package artifact generation to test workflow Add npm package artifact generation and upgrade actions in test workflow Jan 31, 2026
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copilot AI requested a review from mikeharder January 31, 2026 00:31
@mikeharder
Copy link
Member

@copilot: revert changes to upgrade actions versions and node version

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 31, 2026

@copilot: revert changes to upgrade actions versions and node version

Done in 382312c - reverted actions back to v4 (checkout, setup-node, upload-artifact) and node version back to 22.

Copilot AI changed the title Add npm package artifact generation and upgrade actions in test workflow Add npm package artifact generation to test workflow Jan 31, 2026
@mikeharder mikeharder marked this pull request as ready for review January 31, 2026 00:50

- name: Upload npm packages
if: contains(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
Copy link
Member

Choose a reason for hiding this comment

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

@copilot: upgrade just this action to the latest version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 1afc4ca - upgraded actions/upload-artifact from v4 to v6.

name: packages
path: |
packages/**/*.tgz
!packages/**/node_modules/**/*.tgz
Copy link
Member

Choose a reason for hiding this comment

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

@copilot: would it be safer to exclude everything under node_modules? if so, do we even need the last **?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done in 187db23 - changed to !packages/**/node_modules/** to exclude everything under node_modules (not just .tgz files). The ** at the end is needed to match any files/directories at any depth within node_modules.

Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
Co-authored-by: mikeharder <9459391+mikeharder@users.noreply.github.com>
@mikeharder mikeharder merged commit d717c97 into main Feb 2, 2026
10 checks passed
@mikeharder mikeharder deleted the copilot/update-npm-package-artifacts branch February 2, 2026 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🔬 Dev in PR

Development

Successfully merging this pull request may close these issues.

3 participants