Skip to content

Conversation

@0marperez
Copy link
Contributor

@0marperez 0marperez commented May 15, 2025

Issue #, if available:
N/A

Description of changes:
Automates the process of creating tags and running codebuild job for releases.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@0marperez 0marperez marked this pull request as ready for review May 15, 2025 17:15
@0marperez 0marperez marked this pull request as draft May 15, 2025 17:31
@0marperez 0marperez marked this pull request as ready for review May 15, 2025 21:59
exit 0
fi
CURRENT_VERSION=$(git tag --sort=-creatordate | head -n 1)
Copy link
Member

Choose a reason for hiding this comment

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

correctness: What if the latest tag is a -kn variant?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-kn variants are temprorary right? How much longer do you think we'll have them for? We can use the version override

Copy link
Member

Choose a reason for hiding this comment

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

I can't say for sure when we'll stop using -kn suffixes. But right now if I release a -kn variant, then go to run this new script, won't it crash/misbehave when trying to add 1 to the patch version?

@0marperez 0marperez requested a review from lauzadis May 19, 2025 17:47
@0marperez
Copy link
Contributor Author

Did some last minute cleanup after looking at this, I hadn't in a while. This is ready for review, I shouldn't be making more changes unless requested.

README.md Outdated
5. Under `Source` connect your GitHub account (Under `Source` -> `Connection Status` you should see "You are connected to GitHub").
7. Specify the tag you created under `Source Version`.
8. Start the build.
1. Go to this repos GitHub actions.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: reposrepo's

Comment on lines 21 to 30
To cut a new release:

1. Create a new tag, e.g. `git tag x.y.z`.
2. Push the tag up `git push origin x.y.z`.
3. Go to the CodeBuild release job hosted in the shared tools account (e.g. `publish-aws-kotlin-repo-tools`).
4. Start a build with overrides.
5. Under `Source` connect your GitHub account (Under `Source` -> `Connection Status` you should see "You are connected to GitHub").
7. Specify the tag you created under `Source Version`.
8. Start the build.
1. Go to this repos GitHub actions.
2. Locate the release workflow.
3. Specify whether the release will be of a kn variant (used for Kotlin Native development).
4. If you're doing a minor or major version bump, specify the version override (including "-kn" if a kn variant).
5. Run the workflow.

The workflow will create a tag, push it to this repo and then start a
CodeBuild release job hosted in the shared tools account (e.g. `publish-aws-kotlin-repo-tools`).
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Don't remove the old manual instructions entirely. Leave them in the README.md in a subheader, a collapsed section, etc.

PATCH_NUMBER=${PATCH%%[^0-9]*}
PATCH_SUFFIX=${PATCH#$PATCH_NUMBER}
((PATCH_NUMBER++))
echo "NEW_VERSION=$MAJOR.$MINOR.$PATCH_NUMBER$SUFFIX" >> "$GITHUB_OUTPUT"
Copy link
Member

Choose a reason for hiding this comment

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

correctness: $SUFFIX undefined

@0marperez 0marperez dismissed lauzadis’s stale review June 24, 2025 19:11

Changes addressed

@0marperez 0marperez merged commit 1a71c5d into main Jun 24, 2025
5 checks passed
@0marperez 0marperez deleted the release-workflow branch June 24, 2025 19:11
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