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

Attempt to fix plugin release to github #43

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

pkwarren
Copy link
Contributor

@pkwarren pkwarren commented May 2, 2023

During the last release, we still encountered an issue in the plugin release step. Ensure we set the releaseVersion property when running the gradle build.

During the last release, we still encountered an issue in the plugin
release step. Ensure we set the releaseVersion property when running the
gradle build.
@pkwarren pkwarren requested review from stefanvanburen and rhbuf May 2, 2023 16:56
tag=$(git describe --tags --abbrev=0 --exact-match)
release_version="${tag:1}"
echo "release_version=${release_version}" >> "$GITHUB_ENV"
export ORG_GRADLE_PROJECT_releaseVersion="${release_version}"
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 to set this prior to running the build to ensure the artifact has the right version number.

tag=$(git describe --tags --abbrev=0 --exact-match)
release_version="${tag:1}"
echo "release_version=${release_version}" >> "$GITHUB_ENV"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

release_version is used in the next step so we need to set it in the environment.

Copy link
Contributor

Choose a reason for hiding this comment

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

ye, was wondering about that, thanks for the explanation!

Copy link
Contributor

@stefanvanburen stefanvanburen left a comment

Choose a reason for hiding this comment

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

cool - more as notes for myself, this sets a project property in the environment which then is picked up in the gradle publish. 👍

@pkwarren pkwarren merged commit 7ce9b3c into main May 2, 2023
@pkwarren pkwarren deleted the pkw/github-plugin-release branch May 2, 2023 17:10
@pkwarren
Copy link
Contributor Author

pkwarren commented May 2, 2023

Unfortunately this didn't completely fix the issue - #44 should resolve it.

I do think however there is merit in improving this in two ways:

  1. We should publish the same identical artifact pushed to Maven Central to our GitHub releases.
  2. We should update the sha256sum command to be ./sha256sum protoc-gen-connect-kotlin-${release_version}.jar >> sha256.txt instead of sha256sum ./protoc-gen-connect-kotlin/build/libs/protoc-gen-connect-kotlin-${release_version}.jar >> sha256.txt. This will make it easier for people downloading from the artifact to verify the checksum (otherwise they'd have to recreate the directories and move it into there).

@pkwarren
Copy link
Contributor Author

pkwarren commented May 2, 2023

Addressed item 2 in PR #45. Users wanting to download the artifacts in the 0.1.5/0.1.6/0.1.7 releases can download from https://repo1.maven.org/maven2/build/buf/protoc-gen-connect-kotlin/

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