Skip to content

Conversation

@TartanLeGrand
Copy link
Contributor

This pull request updates the .github/workflows/publish-npm-deserializer.yml file to restructure the CI/CD workflow by replacing the set-env job with a new build-sdk job and modifying the publish-npm job to align with these changes.

Workflow restructuring:

  • Replaced the set-env job with a new build-sdk job that uses a Node.js 18 container, installs dependencies, runs code generation, builds the SDK, and uploads the build artifacts (sdk-dist).
  • Updated the publish-npm job to depend on the build-sdk job instead of set-env. It now uses the feat/publish-npm version of the reusable workflow and includes additional setup commands (npm ci && npm run test:prepare).

npm run codegen
npm run build
cd ../dataprotector-deserializer
npm run test:prepare
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why we need this ?

working-directory: "packages/dataprotector-deserializer"
install-command: |
npm ci
cd ../sdk
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Copilot AI left a comment

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 restructures the CI workflow for publishing the deserializer package by replacing the old set-env job with a set-publish-version job, adding a beta tag option, and updating the publish-npm step to use version 1.4.0 of the reusable workflow with additional setup commands.

  • Added a beta release tag alongside latest and nightly
  • Introduced a set-publish-version job to calculate and output the package version
  • Updated publish-npm to depend on set-publish-version, use v1.4.0 of the reusable workflow, and perform SDK build and test preparation
Comments suppressed due to low confidence (5)

.github/workflows/publish-npm-deserializer.yml:17

  • [nitpick] The job is named set-publish-version but also checks out code and sets up Node.js. Consider renaming this to build-and-set-version (or split into separate build-sdk and set-version jobs) to more accurately reflect its responsibilities.
  set-publish-version:

.github/workflows/publish-npm-deserializer.yml:29

  • Using == in a POSIX sh conditional can be brittle on shells that don't support it; use a single = for maximum compatibility ([ ... = ... ]).
          if [ "${{ github.event.inputs.tag }}" == "nightly" ]; then

.github/workflows/publish-npm-deserializer.yml:26

  • You added a beta tag option for inputs but the version-setting logic only special-cases nightly and falls back to the base version for beta and latest. If beta should publish a pre-release (e.g. 1.0.0-beta), extend the script to handle the beta tag explicitly.
        if: github.event.inputs.tag == 'nightly'

.github/workflows/publish-npm-deserializer.yml:47

  • The workflow now always uses production environment. Previously, staging was handled via set-env; ensure that non-latest tags (e.g. beta, nightly) are not inadvertently deployed to a production environment.
      environment: production

.github/workflows/publish-npm-deserializer.yml:50

  • [nitpick] Chaining multiple cd commands in install-command can be fragile; consider using separate actions or working-directory overrides for each step to avoid directory navigation issues.
      install-command: |

@TartanLeGrand TartanLeGrand merged commit ebdb382 into develop Jun 16, 2025
2 checks passed
@TartanLeGrand TartanLeGrand deleted the ci/fix/npm branch June 16, 2025 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants