Compare commits
1 Commits
goreleaser
...
main
Author | SHA1 | Date |
---|---|---|
jolheiser | 5e15502da0 |
2
LICENSE
2
LICENSE
|
@ -1,4 +1,4 @@
|
||||||
Copyright (c) 2022 John Olheiser
|
Copyright (c) 2020 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 @@
|
||||||
# goreleaser
|
# tmpl templates
|
||||||
|
|
||||||
A template to generate `goreleaser` config and accompanying Woodpecker pipeline.
|
Check out the various branches for some basic examples of templates.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
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}}
|
|
|
@ -0,0 +1 @@
|
||||||
|
Delete this file and put something else here!
|
|
@ -1,39 +0,0 @@
|
||||||
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,16 +1,11 @@
|
||||||
|
# tmpl.yaml
|
||||||
|
# Write any template args here to prompt the user for, giving any defaults/options as applicable
|
||||||
|
|
||||||
prompts:
|
prompts:
|
||||||
- id: gitea_domain
|
- id: name
|
||||||
label: Gitea Domain
|
label: Name
|
||||||
default: git.jojodev.com
|
default: MyProject
|
||||||
help: No protocol or trailing slash
|
- id: lang
|
||||||
- id: gitea_user
|
label: Language
|
||||||
label: Gitea User
|
default: Go
|
||||||
- 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