Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release workflow #21

Merged
merged 3 commits into from
Nov 22, 2024
Merged

Release workflow #21

merged 3 commits into from
Nov 22, 2024

Conversation

jonsmock
Copy link
Collaborator

These changes will automatically do NPM and Docker Hub releases, when we push a git tag of the form 'vX.Y.Z'. Before we release, we run all tests and verify the git tag matches our package.json.

The "release-(npm|docker-hub)" jobs are gated by a "check-release" job, which is where we sanity test the package.json version and could do other linting/checks in the future.

I've added the necessary secrets to this repo. I've verified the tag check works and that the release jobs can work. Other than updating a couple docker actions's versions to remove the GHA node 16 warning, I believe the only thing I haven't tested is the actual publishing of artifacts (commented out in the last commit).

If this looks good, I'll remove the last commit, merge, and push a commit+tag to release 0.4.0 w/ CHANGELOG updates.

Automatically publish releases to NPM and Docker Hub from GHA. Only
performs a release, when:

- all tests pass on all supported platforms
- a new git tag is pushed (expected format "v1.0.0")
- git tag matches the version in package.json

The gating of releases happens in the 'check-release' job, which all
future release-* jobs depend on. This is where any final linting or
sanity checking can be done.
@jonsmock jonsmock requested review from kanaka and gdw2 November 21, 2024 19:40
@jonsmock
Copy link
Collaborator Author

Oops, I also updated the Docker image to use node 20 and added a matrix test to cover commonly used node versions.

Copy link
Collaborator

@kanaka kanaka left a comment

Choose a reason for hiding this comment

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

Looks great!

@jonsmock jonsmock merged commit 2eb2e24 into main Nov 22, 2024
16 checks passed
@jonsmock jonsmock deleted the release-workflow branch November 22, 2024 03:10
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