Compare commits
4 Commits
main
...
goreleaser
Author | SHA1 | Date |
---|---|---|
jolheiser | ae7b7df1e3 | |
jolheiser | d8b5196d4f | |
jolheiser | 1e67b05f62 | |
jolheiser | c6344456e8 |
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2020 John Olheiser
|
Copyright (c) 2022 John Olheiser
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# tmpl templates
|
# goreleaser
|
||||||
|
|
||||||
Check out the various branches for some basic examples of templates.
|
A template to generate `goreleaser` config and accompanying Woodpecker pipeline.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
- darwin
|
||||||
|
ldflags:
|
||||||
|
- "-s -w -X {{version_package}}.Version={{`{{.Version}}`}}"
|
||||||
|
archives:
|
||||||
|
- replacements:
|
||||||
|
386: i386
|
||||||
|
amd64: x86_64
|
||||||
|
format_overrides:
|
||||||
|
- goos: windows
|
||||||
|
format: zip
|
||||||
|
checksum:
|
||||||
|
name_template: 'checksums.txt'
|
||||||
|
release:
|
||||||
|
gitea:
|
||||||
|
owner: {{gitea_user}}
|
||||||
|
name: {{gitea_repo}}
|
||||||
|
gitea_urls:
|
||||||
|
api: https://{{gitea_domain}}/api/v1/
|
||||||
|
download: https://{{gitea_domain}}
|
|
@ -1 +0,0 @@
|
||||||
Delete this file and put something else here!
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
clone:
|
||||||
|
git:
|
||||||
|
image: woodpeckerci/plugin-git
|
||||||
|
settings:
|
||||||
|
tags: true
|
||||||
|
|
||||||
|
pipeline:
|
||||||
|
compliance:
|
||||||
|
image: golang:1.18
|
||||||
|
commands:
|
||||||
|
- go test -race ./...
|
||||||
|
- go vet ./...
|
||||||
|
- go run github.com/rs/zerolog/cmd/lint@latest {{module}}
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
build:
|
||||||
|
image: goreleaser/goreleaser
|
||||||
|
commands:
|
||||||
|
- goreleaser build --snapshot
|
||||||
|
when:
|
||||||
|
event: pull_request
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: goreleaser/goreleaser
|
||||||
|
commands:
|
||||||
|
- goreleaser release
|
||||||
|
secrets: [ gitea_token ]
|
||||||
|
when:
|
||||||
|
event: tag
|
||||||
|
|
||||||
|
prune:
|
||||||
|
image: jolheiser/drone-gitea-prune
|
||||||
|
settings:
|
||||||
|
base: https://{{gitea_domain}}
|
||||||
|
token:
|
||||||
|
from_secret: gitea_token
|
||||||
|
when:
|
||||||
|
event: tag
|
25
tmpl.yaml
25
tmpl.yaml
|
@ -1,11 +1,16 @@
|
||||||
# tmpl.yaml
|
|
||||||
# Write any template args here to prompt the user for, giving any defaults/options as applicable
|
|
||||||
|
|
||||||
prompts:
|
prompts:
|
||||||
- id: name
|
- id: gitea_domain
|
||||||
label: Name
|
label: Gitea Domain
|
||||||
default: MyProject
|
default: git.jojodev.com
|
||||||
- id: lang
|
help: No protocol or trailing slash
|
||||||
label: Language
|
- id: gitea_user
|
||||||
default: Go
|
label: Gitea User
|
||||||
|
- id: gitea_repo
|
||||||
|
label: Gitea Repo
|
||||||
|
- id: module
|
||||||
|
label: Module
|
||||||
|
default: ${TMPL_PROMPT_GITEA_DOMAIN}/${TMPL_PROMPT_GITEA_USER}/${TMPL_PROMPT_GITEA_REPO}
|
||||||
|
- id: version_package
|
||||||
|
label: Version Package
|
||||||
|
help: The package where the `Version` variable is
|
||||||
|
default: ${TMPL_PROMPT_MODULE}/cmd
|
Loading…
Reference in New Issue