-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Example values containing "=" were ignored
- Add new '--version' flag - Add new BUILD_DATE for use in --version output
- Loading branch information
Showing
2 changed files
with
50 additions
and
11 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 |
---|---|---|
|
@@ -28,14 +28,21 @@ jobs: | |
git config --global user.email "[email protected]" | ||
git config --global user.name "Github Actions" | ||
go install git.sr.ht/~jcmuller/semver-bumper@latest | ||
OLD_TAG=$(git tag --list 'v*' | semver-bumper -s) | ||
NEW_TAG=$(git tag --list 'v*' | semver-bumper --increment minor) | ||
sed -i "s/$OLD_TAG/$NEW_TAG/g" default.nix | ||
newTag=$(git tag --list 'v*' | semver-bumper --increment minor) | ||
buildDate=$(date --iso-8601=seconds) | ||
sed -i -e "s@BUILD_DATE = \".\+\"@BUILD_DATE = \"${buildDate/v}\"@" main.go | ||
sed -i -e "s@VERSION = \".\+\"@VERSION = \"${newTag/v}\"@" main.go | ||
sed -i -e "s@version = \".\+\"@version = \"${newTag/v}\"@" default.nix | ||
git add default.nix | ||
git commit -m "Bump version in default.nix" --allow-empty | ||
git add main.go | ||
git commit -m "Bump release version" | ||
git tag $NEW_TAG | ||
git push | ||
git push --tags | ||
- name: Checkout after code mods | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
|
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