-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
159 additions
and
102 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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -9,7 +9,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: setup docker buildx | ||
uses: docker/setup-buildx-action@v2 | ||
- name: create build container | ||
run: make container-debian-build-image | ||
env: | ||
DOCKER_BUILD_FLAGS: --load --cache-from=type=gha --cache-to=type=gha,mode=max | ||
- name: run tests | ||
run: make container-test | ||
- name: container-all-packages | ||
run: make container-all-packages | ||
- name: upload linux packages | ||
|
@@ -22,7 +30,7 @@ jobs: | |
runs-on: macos-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: install latest rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
|
@@ -33,6 +41,8 @@ jobs: | |
run: rustup target install x86_64-apple-darwin aarch64-apple-darwin | ||
- name: install latest gnu make version | ||
run: brew install make | ||
- name: run tests | ||
run: gmake test | ||
- name: macos-packages | ||
run: gmake gz-packages | ||
- name: upload MacOS packages | ||
|
@@ -42,13 +52,14 @@ jobs: | |
retention-days: 1 | ||
path: target/dist/ | ||
build-supplemental-files-and-release: | ||
environment: release | ||
needs: | ||
- build-linux-packages | ||
- build-macos-packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
- name: download linux packages | ||
uses: actions/download-artifact@v3 | ||
with: | ||
|
@@ -64,14 +75,35 @@ jobs: | |
- name: output checksums | ||
run: cat target/dist/SHA256SUMS | ||
- name: release-notes | ||
run: make release-notes | ||
run: | | ||
git fetch --tags | ||
git fetch --unshallow || true | ||
make release-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: append to changelog | ||
run: make changelog >> CHANGELOG.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: homebrew-package | ||
run: make homebrew-packages | ||
- name: assign git user | ||
- name: assign git user and commit release changes | ||
run: | | ||
git config user.name 'Github Action' | ||
git config user.email '[email protected]' | ||
- name: do release | ||
git commit CHANGELOG.md pkg/brew/*.rb -m "ci: release changes for ${GITHUB_REF_NAME}" | ||
git push origin ${GITHUB_REF_NAME} | ||
- name: do github release | ||
run: make gh-make-release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: do cargo release | ||
# Do not fail build on crates.io problems | ||
run: make cargo-release || true | ||
env: | ||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | ||
- name: create pull request integrating release branch changes | ||
run: | | ||
gh pr create --title "ci: integrate release changes for ${GITHUB_REF_NAME}" --body "This pull request was automatically created by the Github Action workflow **${GITHUB_WORKFLOW}**." --head ${GITHUB_REF_NAME} --base master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,3 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. |
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
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
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,27 @@ | ||
# Release Process | ||
|
||
This document describes the process for releasing a new version of the | ||
project. | ||
|
||
## Prerequisites | ||
|
||
- You must be a maintainer of the project. | ||
- You must have installed GNU Make 4+. | ||
- You must have committer rights. | ||
|
||
## Release Process | ||
|
||
1. Create a new branch for the release, e.g. `release-v1.2.3`: | ||
`git checkout -b release-v1.2.3` | ||
2. Update the Cargo.toml version to the new version: | ||
`make version-release` | ||
3. Check in version changes: `git commit Cargo.toml -m "ci: updating version to 1.2.3"` | ||
4. Wait for CI to build, tag and perform the release. | ||
5. Pull the latest changes from origin because the CI will have pushed changes to the branch. | ||
6. Once the release is complete, rebase the release branch into master: ` | ||
git rebase --onto origin/master release-v1.2.3 master | ||
git push origin master` | ||
7. Increment the version to the next development version: `make version-update` and | ||
use a version number like 1.2.4-beta. | ||
8. Check in version changes: `git commit Cargo.toml -m "ci: updating version to 1.2.4-beta"` | ||
9. Delete release branch from origin. |
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,42 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script generates a changelog for the current version of the project. | ||
|
||
set -o errexit # abort on nonzero exit status | ||
set -o nounset # abort on unbound variable | ||
set -o pipefail # don't hide errors within pipes | ||
|
||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" | ||
|
||
pushd . > /dev/null | ||
cd "${SCRIPT_DIR}/.." | ||
|
||
if command -v ggrep > /dev/null; then | ||
GREP=ggrep | ||
else | ||
GREP=grep | ||
fi | ||
if command -v gsed > /dev/null; then | ||
SED=gsed | ||
else | ||
SED=sed | ||
fi | ||
|
||
# if gh is installed, use it to pull the last version number | ||
if command -v gh > /dev/null; then | ||
LAST_RELEASE="$(gh release list | ${GREP} -E 'v[0-9]+\.[0-9]+\.[0-9]+' | cut -f1 | ${GREP} -v "${VERSION}" | head -n1)" | ||
else | ||
LAST_RELEASE="$(git tag -l | ${GREP} -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | sort --version-sort --field-separator=. --reverse | ${GREP} -v "${VERSION}" | head -n1)" | ||
fi | ||
|
||
LAST_RELEASE_HASH="$(git show --format=%H "${LAST_RELEASE}" | head -n1)" | ||
|
||
echo "## Changes between ${LAST_RELEASE} [$LAST_RELEASE_HASH] and ${VERSION}:" | ||
git log --format="%s (%h)" "${LAST_RELEASE_HASH}..HEAD" | \ | ||
${GREP} -E -v '^(ci|chore): .*' | \ | ||
${SED} 's/: /:\t/g1' | \ | ||
column -s " " -t | \ | ||
${SED} -e 's/^/ * /' | ||
|
||
echo "" | ||
popd > /dev/null |
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
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
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
Oops, something went wrong.