Skip to content

Commit b8dd0ad

Browse files
authored
chore: Add release version to commit message (#428)
Make it easier when looking at commit messages to tell what version was being released Also, create a major version tag which will allow users to get minor updates without manually updating their action file ```yaml - uses: launchdarkly/find-code-references@v2 ```
1 parent 6dca539 commit b8dd0ad

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.ldrelease/publish-bitbucket-metadata.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ cd bitbucketMetadataUpdates
1717
git config user.email "[email protected]"
1818
git config user.name "LaunchDarklyReleaseBot"
1919
git add -u
20-
git commit -m "Release auto update version"
20+
git commit -m "Release auto update version $RELEASE_VERSION"
2121
git remote add bb-origin "https://${BITBUCKET_USERNAME}:${BITBUCKET_TOKEN}@bitbucket.org/launchdarkly/ld-find-code-refs-pipe.git"
2222

2323
if [[ -z "${LD_RELEASE_DRY_RUN}" ]]; then

.ldrelease/publish-github-actions-metadata.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ RELEASE_TAG="v${RELEASE_VERSION}"
99
GITHUB_TOKEN=${2:-"${LD_RELEASE_SECRETS_DIR}/github_token"}
1010
RELEASE_NOTES="$(make echo-release-notes)"
1111

12+
# All users of github action to reference major version tag
13+
VERSION_MAJOR="${RELEASE_VERSION%%\.*}"
14+
RELEASE_TAG_MAJOR="v${VERSION_MAJOR}"
15+
1216
# install gh cli so we can create a release later https://github.com/cli/cli/blob/trunk/docs/install_linux.md
1317
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
1418
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
@@ -28,14 +32,16 @@ cd githubActionsMetadataUpdates
2832
git config user.email "[email protected]"
2933
git config user.name "LaunchDarklyReleaseBot"
3034
git add -u
31-
git commit -m "Release auto update version"
35+
git commit -m "Release auto update version $RELEASE_VERSION"
3236

3337
if [[ -z "${LD_RELEASE_DRY_RUN}" ]]; then
3438
echo "Live run: will publish action to github action marketplace."
3539

3640
# tag the commit with the release version and create release
3741
git tag $RELEASE_TAG
3842
git push origin main --tags
43+
git tag -f $RELEASE_TAG_MAJOR
44+
git push -f origin $RELEASE_TAG_MAJOR
3945
gh release create $RELEASE_TAG --notes "$RELEASE_NOTES"
4046
else
4147
echo "Dry run: will not publish action to github action marketplace."

0 commit comments

Comments
 (0)