-
Notifications
You must be signed in to change notification settings - Fork 25
ci: include compiled archives in snapshot build releases #6
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
Changes from 5 commits
19f93c5
6078ccd
ec20fcd
cc496f3
70e8223
3e3cf9f
d1e5f51
67bc246
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -33,7 +33,7 @@ commands: | |
| - run: | ||
| name: Output BUILD_VERSION env var based on recent git tag and type of build | ||
| command: | | ||
| BUILD_VERSION=$(git describe --tags --match 'v*.*.*' --exclude '*feature'); | ||
| BUILD_VERSION=$(git describe --tags --match 'v*.*.*'); | ||
| echo "git tag-based BUILD_VERSION: $BUILD_VERSION" | ||
| if [[ "<< parameters.release_ref >>" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then | ||
| # if release tag starts with semver, then this is either a prod or feature build. use the release tag, then, as build version too. | ||
|
|
@@ -152,7 +152,7 @@ jobs: | |
| name: Run GoReleaser. Without actually publishing. | ||
| command: | | ||
| export LDFLAGS="-s -w -X 'github.com/slackapi/slack-cli/internal/pkg/version.Version=$BUILD_VERSION'" | ||
| make build-snapshot | ||
| make LDFLAGS="$LDFLAGS" build-snapshot | ||
|
Member
Author
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. The Before: After:
Member
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. Great catch @zimeg! 👏🏻 Before this change, the |
||
| - run: | ||
| name: Show binaries are generated correctly | ||
| command: ls -R ./dist | ||
|
|
@@ -313,10 +313,10 @@ jobs: | |
| echo "Overwriting existing GitHub Release data; generating pre-release notes ..." | ||
| LAST_SEMVER_TAG=$(git describe --tags --match 'v*.*.*' --abbrev=0 | cut -d"-" -f1) | ||
| # When generating release notes, setting the target tag_name property to an existing tag has GitHub ignore the target_commitish property | ||
| # So, set it to some non-existent tag name for release-note-generating purposes. | ||
| # So, set the tag to the commit hash for release-note-generating purposes. | ||
| # See https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#generate-release-notes-content-for-a-release--parameters | ||
| # Note the following _does not change releases or tags_ - it only creates release notes, just like clicking "Generate Release Notes" on the GitHub Releases page. | ||
| CHANGELOG=$(curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_RELEASE_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/slackapi/slack-cli/releases/generate-notes -d "{\"tag_name\":\"does-not-exist\",\"target_commitish\":\"${TARGET}\",\"previous_tag_name\":\"${LAST_SEMVER_TAG}\"}" | jq .body) | ||
zimeg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| CHANGELOG=$(curl -L -X POST -H "Accept: application/vnd.github+json" -H "Authorization: Bearer $GITHUB_RELEASE_TOKEN" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/repos/slackapi/slack-cli/releases/generate-notes -d "{\"tag_name\":\"${TARGET}\",\"target_commitish\":\"${TARGET}\",\"previous_tag_name\":\"${LAST_SEMVER_TAG}\"}" | jq .body) | ||
| echo "Will use release notes: ${CHANGELOG}" | ||
| BODY+="\"body\":$CHANGELOG}" | ||
| echo "Updating existing GitHub pre-release ${RELEASE_ID} with ${BODY}" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.