diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..54e64ee --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +gitea_token diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..0cdd1fc --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,37 @@ +# This is an example .goreleaser.yml file with some sensible defaults. +# Make sure to check the documentation at https://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy + # you may remove this if you don't need go generate + - go generate ./... +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - windows + - darwin +archives: + - replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ incpatch .Version }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' +gitea_urls: + api: https://git.t-juice.club/api/v1/ + download: https://git.t-juice.club +env_files: + gitea_token: gitea_token \ No newline at end of file diff --git a/.woodpecker.yml b/.woodpecker.yml index 9db5b7b..70fc13f 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -7,7 +7,7 @@ pipeline: when: event: [pull_request, push] - release-latest: + image-latest: image: plugins/docker settings: repo: registry.t-juice.club/peckertest @@ -22,7 +22,7 @@ pipeline: branch: master event: push - release-tagged: + image-tagged: image: plugins/docker settings: repo: registry.t-juice.club/peckertest @@ -34,3 +34,13 @@ pipeline: - "${CI_COMMIT_TAG}" when: event: [tag] + + goreleaser-tagged: + image: goreleaser/goreleaser + commands: + - echo "$GITEA_TOKEN" > gitea_token + - goreleaser release + when: + branch: master + event: tag + secrets: [ssh_key]