mirror of
https://github.com/sonr-io/sonr.git
synced 2026-08-02 17:31:39 +00:00
feat: automate release process with conventional commits
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
name = "cz_conventional_commits"
|
||||
tag_format = "v$version"
|
||||
version_scheme = "semver"
|
||||
version = "0.6.3"
|
||||
version_provider = "scm"
|
||||
update_changelog_on_bump = true
|
||||
major_version_zero = true
|
||||
changelog_file = "CHANGELOG.md"
|
||||
pre_bump_hooks = ["make test"]
|
||||
post_bump_hooks = ["make release"]
|
||||
|
||||
+1
-3
@@ -34,12 +34,11 @@ builds:
|
||||
|
||||
archives:
|
||||
- id: sonr
|
||||
builds: [sonr]
|
||||
name_template: >-
|
||||
sonr_{{ .Os }}_{{- if eq .Arch "amd64" }}x86_64
|
||||
{{- else if eq .Arch "386" }}i386
|
||||
{{- else }}{{ .Arch }}{{ end }}
|
||||
format: tar.gz
|
||||
formats: ["tar.gz"]
|
||||
files:
|
||||
- src: README*
|
||||
wrap_in_directory: true
|
||||
@@ -48,7 +47,6 @@ nfpms:
|
||||
- id: sonr
|
||||
package_name: sonrd
|
||||
file_name_template: "sonrd_{{ .Os }}_{{ .Arch }}{{ .ConventionalExtension }}"
|
||||
builds: [sonr]
|
||||
vendor: Sonr
|
||||
homepage: "https://onsonr.dev"
|
||||
maintainer: "Sonr <support@onsonr.dev>"
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
#
|
||||
version: '3'
|
||||
includes:
|
||||
buf: .github/taskfiles/Buf.yml
|
||||
bun: .github/taskfiles/Bun.yml
|
||||
docker: .github/taskfiles/Docker.yml
|
||||
dokku: .github/taskfiles/Dokku.yml
|
||||
doppler: .github/taskfiles/Doppler.yml
|
||||
gh: .github/taskfiles/Gh.yml
|
||||
go: .github/taskfiles/Go.yml
|
||||
goreleaser: .github/taskfiles/Goreleaser.yml
|
||||
log: .github/taskfiles/Log.yml
|
||||
pkl: .github/taskfiles/Pkl.yml
|
||||
templ: .github/taskfiles/Templ.yaml
|
||||
wrangler: .github/taskfiles/Wrangler.yml
|
||||
|
||||
silent: true
|
||||
vars:
|
||||
GREETING: Hello, World!
|
||||
|
||||
tasks:
|
||||
default:
|
||||
cmds:
|
||||
- echo "{{.GREETING}}"
|
||||
@@ -312,6 +312,20 @@ sh-testnet: mod-tidy
|
||||
### extra utils ###
|
||||
###############################################################################
|
||||
|
||||
can-release:
|
||||
@echo "Checking if we can release..."
|
||||
@git diff --exit-code
|
||||
@git diff --cached --exit-code
|
||||
@git tag -l | grep -q -F $(VERSION)
|
||||
@test -z "$$(git ls-files --exclude-standard --others)" || (echo "There are uncommitted files. Please commit or stash them before release."; exit 1)
|
||||
|
||||
should-release:
|
||||
@echo "Checking if we should release..."
|
||||
@git diff --exit-code
|
||||
@git diff --cached --exit-code
|
||||
@git tag -l | grep -q -F $(VERSION)
|
||||
@test -z "$$(git ls-files --exclude-standard --others)" || (echo "There are uncommitted files. Please commit or stash them before release."; exit 1)
|
||||
|
||||
push-docker:
|
||||
@docker build -t ghcr.io/onsonr/sonr:latest .
|
||||
@docker tag ghcr.io/onsonr/sonr:latest ghcr.io/onsonr/sonr:$(VERSION)
|
||||
@@ -330,15 +344,12 @@ push-docker:
|
||||
@docker push ghcr.io/onsonr/sonr:latest
|
||||
|
||||
release:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --clean
|
||||
|
||||
release-dry:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser release --snapshot --clean --skip=publish
|
||||
|
||||
release-check:
|
||||
@go install github.com/goreleaser/goreleaser/v2@latest
|
||||
@RELEASE_DATE=$(RELEASE_DATE) goreleaser check
|
||||
|
||||
validate-tag:
|
||||
|
||||
Reference in New Issue
Block a user