-
Notifications
You must be signed in to change notification settings - Fork 242
feat(release): add changelog entry, GitHub Releases, lastPublished, a… #640
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
Open
fabisev
wants to merge
18
commits into
main
Choose a base branch
from
fabisev/release-changelog-and-github-releases
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
cf830ff
feat(release): add changelog entry, GitHub Releases, lastPublished, a…
fabisev 3bde5cb
Merge branch 'main' into fabisev/release-changelog-and-github-releases
fabisev 555b3f5
build: centralize module versions in a parent POM
fabisev cff1683
Merge branch 'main' into fabisev/release-changelog-and-github-releases
fabisev 45420b7
Merge branch 'main' into fabisev/release-changelog-and-github-releases
fabisev 5d51046
refactor(release): address PR review on parent POM and workflow
fabisev ce9f80b
docs(release): shorten version-map comment
fabisev 5a6a528
chore(release): set meaningful Central deploymentName (GAV)
fabisev f980a36
feat(release): attach signed jars + verify notes to GitHub Release
fabisev 0d41205
Merge branch 'main' into fabisev/release-changelog-and-github-releases
fabisev fb9da27
refactor(release): split shared parent POM into a follow-up PR
fabisev 9bc7a4a
Merge remote-tracking branch 'origin/fabisev/release-changelog-and-gi…
fabisev 91ebbbc
feat(release): attach signed jars to GitHub Releases
fabisev e9d9111
Merge branch 'main' into fabisev/release-changelog-and-github-releases
fabisev 7363371
fix(release): validate release version and keep GPG passphrase off argv
fabisev 649ce7e
chore(release): squash post-release bump into one commit
fabisev b3d7b5b
Merge remote-tracking branch 'origin/fabisev/release-changelog-and-gi…
fabisev baa4cd5
refactor(release): centralize release tag in TAG_NAME
fabisev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Releasing to Maven Central | ||
|
|
||
| How maintainers publish a module using the | ||
| [`Release to Maven Central`](.github/workflows/release.yml) workflow. | ||
|
|
||
| Releasable modules: `aws-lambda-java-core`, `aws-lambda-java-events`, | ||
| `aws-lambda-java-events-sdk-transformer`, `aws-lambda-java-log4j2`, | ||
| `aws-lambda-java-serialization`, `aws-lambda-java-tests`. | ||
|
|
||
| > `aws-lambda-java-runtime-interface-client` has its own pipeline, | ||
| > [`release-runtime-interface-client.yml`](.github/workflows/release-runtime-interface-client.yml). | ||
|
|
||
| ## Cutting a release | ||
|
|
||
| 1. **Actions → Release to Maven Central → Run workflow**, with the branch set to | ||
| **`main`** (releases only run from `main`). | ||
| 2. Fill in the inputs: | ||
|
|
||
| | Input | Required | Notes | | ||
| |-------|----------|-------| | ||
| | `module` | yes | Module directory to release. | | ||
| | `changelogEntry` | yes | Markdown bullets, e.g. `- Fix X`. Added to the module `RELEASE.CHANGELOG.md` and used as the GitHub Release notes. | | ||
| | `releaseVersion` | no | Defaults to the POM version without `-SNAPSHOT`. | | ||
| | `developmentVersion` | no | Next dev version; must end with `-SNAPSHOT`. | | ||
| | `skip_publish` | no | Dry run: build and validate, publish nothing. | | ||
|
|
||
| 3. Run it and approve the `Release` environment when prompted. | ||
|
|
||
| ## What it does | ||
|
|
||
| 1. Validates the branch and resolves the release version from the POM (or your override). | ||
| 2. Builds and tests the module. | ||
| 3. Publishes to Maven Central and pushes the tag `<module>-<version>`. | ||
| 4. Opens a **version-bump PR** into `main` with the next `-SNAPSHOT`, the updated | ||
| `lastPublished` comment, the parent POM's version-map entry (for modules other | ||
| modules depend on: core, events, serialization), and your changelog entry. | ||
| 5. Creates a GitHub Release on the tag from your changelog entry. | ||
|
|
||
| Merge the version-bump PR to return `main` to a clean `-SNAPSHOT` state. | ||
|
|
||
| ## Dry runs | ||
|
|
||
| Set `skip_publish` to build, test, and `release:prepare -DdryRun=true` without | ||
| pushing anything. A `changelogEntry` is still required by the form but unused. | ||
|
|
||
| ## If a release fails | ||
|
|
||
| - **Before publish:** nothing was pushed. Fix and re-run. | ||
| - **After publish:** the Central version is immutable and the tag exists. Don't | ||
| re-run for the same version (it fails at `release:prepare`); finish the | ||
| remaining steps by hand (merge the bump PR, or `gh release create`). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,9 +3,17 @@ | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd"> | ||
| <modelVersion>4.0.0</modelVersion> | ||
|
|
||
| <parent> | ||
| <groupId>com.amazonaws</groupId> | ||
| <artifactId>aws-lambda-java-libs-parent</artifactId> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just call it |
||
| <version>1.0.0</version> | ||
| <relativePath>../pom.xml</relativePath> | ||
| </parent> | ||
|
|
||
| <groupId>com.amazonaws</groupId> | ||
| <artifactId>aws-lambda-java-core</artifactId> | ||
| <version>1.4.1-SNAPSHOT</version> | ||
| <!-- lastPublished: 1.4.0 (auto-updated by release.yml) --> | ||
| <packaging>jar</packaging> | ||
|
|
||
| <name>AWS Lambda Java Core Library</name> | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this hard mapping for different reasons.