Skip to content

Conversation

@lucasmcdonald3
Copy link
Contributor

@lucasmcdonald3 lucasmcdonald3 commented Oct 29, 2025

Issue #, if available:

Description of changes:

Translate this package's the CodeBuild release workflow to GHA.

Today we publish to npm with legacy tokens which are slated to be removed sometime next week.
Suggested alternatives are

  • granular tokens: Con is granular tokens can only exist for 90 days, so we would need to regenerate a token (basically) every time we publish
  • trusted publishers: Use OIDC to authenticate publication. CodeBuild isn't supported, so we would use GHA.

Testing: Had a previous commit that ran this workflow on PRs: https://github.com/aws/aws-encryption-sdk-javascript/actions/runs/19046654780/job/54400214440?pr=1614
Successful except for browser test vectors failure, whose failure reason is documented in workflow comments.

The next PR would add publishing.
The current CodeBuild publishing steps are not what we would use in GHA, so I won't copy them over.
CodeBuild uses OTP to publish, but GHA would follow these steps.
I'm keeping that out of scope for this "translation" PR so the new publishing steps would be easier to see.

(Also bump testing timeout -- 2s was timing out while loading AWS SDK, bump to 5s seems to work)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

Lucas McDonald added 2 commits October 29, 2025 13:20
@lucasmcdonald3 lucasmcdonald3 requested a review from a team as a code owner October 29, 2025 20:21
Lucas McDonald added 3 commits October 29, 2025 13:43
Lucas McDonald added 5 commits October 29, 2025 14:26
@lucasmcdonald3 lucasmcdonald3 changed the title chore: GHA release script chore: Migrate CodeBuild release to GHA (without publishing) Oct 29, 2025
@lucasmcdonald3 lucasmcdonald3 changed the title chore: Migrate CodeBuild release to GHA (without publishing) chore: Migrate CodeBuild release to GHA (without publishing step) Oct 29, 2025
Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

This is looking good.

fetch-depth: 0
submodules: true

- name: Setup Node.js 16
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 16?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's what the CodeBuild uses today

NPM_CONFIG_UNSAFE_PERM: true

jobs:
compliance:
Copy link
Contributor

Choose a reason for hiding this comment

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

Do these need to come first? Can we break this up maybe? To have the publishing things come first?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need some validations to come first:

  1. Pre-publish validation that the head of main is healthy
  2. Publish
  3. Post-publish validation on the published artifact

Lucas McDonald added 5 commits November 3, 2025 11:14
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.

2 participants