forked from tinkerbell/playground
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Remove old tooling around bumping container image versions and publishing binaries - Add script to assist with tagging a release - Document the release process (push tag and github action that creates release)
- Loading branch information
Showing
16 changed files
with
59 additions
and
1,131 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -7,14 +7,8 @@ jobs: | |
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: sudo apt-get update && sudo apt install -y libgpgme-dev libassuan-dev libdevmapper-dev btrfs-progs libbtrfs-dev | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: "1.15.5" | ||
- run: ./releases/script/release-binaries.sh | ||
name: get binaries | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
|
@@ -25,9 +19,3 @@ jobs: | |
release_name: Release ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload release binaries | ||
uses: alexellis/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
with: | ||
asset_paths: '["./releases/out/release/*"]' |
This file contains 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,40 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit -o nounset -o pipefail | ||
|
||
if [ -z "${1-}" ]; then | ||
echo "Must specify new tag" | ||
exit 1 | ||
fi | ||
|
||
new_tag=${1-} | ||
[[ $new_tag =~ ^v[0-9]*\.[0-9]*\.[0-9]*$ ]] || ( | ||
echo "Tag must be in the form of vX.Y.Z" | ||
exit 1 | ||
) | ||
|
||
if [[ $(git symbolic-ref HEAD) != refs/heads/main ]] && [[ -z ${ALLOW_NON_MAIN:-} ]]; then | ||
echo "Must be on main branch" >&2 | ||
exit 1 | ||
fi | ||
if [[ $(git describe --dirty) != $(git describe) ]]; then | ||
echo "Repo must be in a clean state" >&2 | ||
exit 1 | ||
fi | ||
|
||
git fetch --all | ||
|
||
last_tag=$(git describe --abbrev=0) | ||
last_tag_commit=$(git rev-list -n1 "$last_tag") | ||
last_specific_tag=$(git tag --contains="$last_tag_commit" | grep -E "^v[0-9]*\.[0-9]*\.[0-9]*$" | tail -n 1) | ||
last_specific_tag_commit=$(git rev-list -n1 "$last_specific_tag") | ||
if [[ $last_specific_tag_commit == $(git rev-list -n1 HEAD) ]]; then | ||
echo "No commits since last tag" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [[ -n ${SIGN_TAG-} ]]; then | ||
git tag -s -m "${new_tag}" "${new_tag}" &>/dev/null && echo "created signed tag ${new_tag}" >&2 && exit | ||
else | ||
git tag -a -m "${new_tag}" "${new_tag}" &>/dev/null && echo "created annotated tag ${new_tag}" >&2 && exit | ||
fi |
This file contains 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,19 @@ | ||
# Releasing | ||
|
||
## Process | ||
|
||
For version v0.x.y: | ||
|
||
1. Create the annotated tag | ||
> NOTE: To use your GPG signature when pushing the tag, use `SIGN_TAG=1 ./contrib/tag-release.sh v0.x.y` instead) | ||
- `./contrib/tag-release.sh v0.x.y` | ||
1. Push the tag to the GitHub repository. This will automatically trigger a [Github Action](https://github.com/tinkerbell/sandbox/actions) to create a release. | ||
> NOTE: `origin` should be the name of the remote pointing to `github.com/tinkerbell/sandbox` | ||
- `git push origin v0.x.y` | ||
1. Review the release on GitHub. | ||
|
||
### Permissions | ||
|
||
Releasing requires a particular set of permissions. | ||
|
||
- Tag push access to the GitHub repository |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.