mirror of
https://github.com/acaloiaro/neoq
synced 2026-07-21 18:29:08 +00:00
chore: use svu for versioning
This commit is contained in:
parent
0e5794efd9
commit
f59f6d68f4
1 changed files with 17 additions and 13 deletions
30
.github/workflows/goreleaser.yml
vendored
30
.github/workflows/goreleaser.yml
vendored
|
|
@ -12,23 +12,27 @@ jobs:
|
||||||
goreleaser:
|
goreleaser:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
-
|
- name: Set up Go
|
||||||
name: Bump version and push tag
|
|
||||||
uses: anothrNick/github-tag-action@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
WITH_V: true
|
|
||||||
DEFAULT_BUMP: minor
|
|
||||||
-
|
|
||||||
name: Set up Go
|
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
-
|
- name: Bump version and push tag
|
||||||
name: Run GoReleaser
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git config --global user.email "actions@github.com"
|
||||||
|
git config --global user.name "Github Actions"
|
||||||
|
go install github.com/caarlos0/svu@latest
|
||||||
|
OLD_TAG=$(svu current --strip-prefix)
|
||||||
|
NEW_TAG=$(svu next --strip-prefix)
|
||||||
|
[ "$OLD_TAG" == "$NEW_TAG" ] && echo "no version bump" && exit 0
|
||||||
|
git commit -m "bump release version" --allow-empty
|
||||||
|
git tag v$NEW_TAG
|
||||||
|
git tag $NEW_TAG
|
||||||
|
git push
|
||||||
|
git push --tags
|
||||||
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v4
|
uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue