Scripts and configuration files for publishing a
kustomize
release on the release page.
Install cloud-build-local
, then run
./releasing/localbuild.sh
to build artifacts under ./dist
.
Get on an up-to-date master branch:
git fetch upstream
git checkout master
git rebase upstream/master
git tag -l
git ls-remote --tags upstream
Define the version per semver principles; it must start with v
:
version=v3.0.0-pre
Must delete the tag before re-pushing it.
Delete the tag locally:
git tag --delete $version
Delete it upstream:
# Disable push protection:
git remote set-url --push upstream [email protected]/xmlking/grpc-starter-kit.git
# The empty space before the colon effectively means delete the tag.
git push upstream :refs/tags/$version
# Enable push protection:
git remote set-url --push upstream no_push
Optionally visit the release page and delete (what has now become) the draft release for that version.
git tag -a $version -m "Release $version"
Push the tag:
git push upstream $version
This triggers a job in Google Cloud Build to put a new release on the release page.
Visit the release page and edit the release notes as desired.
Following command bump VERSION number and push changes
and tag
to remote
Then, GitHub Action trigger GoReleaser
process.
NOTE: make sure you commit all changes before running this command.
###
```shell
# dry-run: calculate the next version based on the commit types since the latest tag
cog bump --auto --dry-run
# calculate the next version based on the commit types since the latest tag
cog bump --auto
- check cog docs
# you can verify your .goreleaser.yaml is valid by running the check command:
goreleaser check
# dry-run: lets run a "local-only" release to see if it works using the release command:
goreleaser release --snapshot --rm-dist --skip-sign
# You can also use GoReleaser to build the binary only for a given GOOS/GOARCH, which is useful for local development:
# goreleaser build --single-target --snapshot --rm-dist
goreleaser build --snapshot --rm-dist
In order to release to GitHub, you'll need to export a GITHUB_TOKEN
environment variable, which should contain a valid
GitHub token with the repository scope.
export GITHUB_TOKEN="YOUR_GH_TOKEN"
export SLACK_WEBHOOK=https://hooks.slack.com/services/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
# Now, change to main branch, create a tag and push it to GitHub:
git tag v0.1.1 -m "build(release): bump version to v0.1.1"
git push origin v0.1.1
# Now you can run GoReleaser at the root of your repository:
goreleaser release --rm-dist --skip-sign
# That's all it takes!
Test multi-platform docker images
docker run --rm --platform linux/amd64 \
ghcr.io/xmlking/grpc-starter-kit/account:latest
docker run --rm --platform linux/arm64 \
ghcr.io/xmlking/grpc-starter-kit/account:latest