Publish from Gitea: releases, CI and install docs

Gitea implements no Terraform provider registry, so distribution goes
through release archives plus a filesystem mirror. GoReleaser targets
the Gitea release API; the archive names follow HashiCorp's convention
because that is the only shape a filesystem mirror recognises.

No GPG signing: signatures are a registry-protocol requirement and a
filesystem mirror never checks them.

Cross-repo links point at Gitea; Go module paths deliberately do not.
This commit is contained in:
2026-08-09 12:37:07 +03:00
parent a6d8aa8b52
commit abe4444d2b
4 changed files with 198 additions and 10 deletions

89
.goreleaser.yml Normal file
View File

@@ -0,0 +1,89 @@
# Publishes provider binaries to a Gitea release.
#
# Gitea has no Terraform provider registry -- that protocol is not one of the
# ~20 package types it implements -- so these archives are consumed through a
# filesystem mirror instead. See "Installing" in the README.
#
# The archive names follow HashiCorp's convention
# (terraform-provider-NAME_VERSION_OS_ARCH.zip) because a filesystem mirror
# recognises exactly that shape, and nothing else.
version: 2
project_name: terraform-provider-dokploy
before:
hooks:
- go mod download
builds:
- id: provider
main: .
binary: "{{ .ProjectName }}_v{{ .Version }}"
env:
- CGO_ENABLED=0
flags:
- -trimpath
ldflags:
- -s -w
- -X main.version={{ .Version }}
goos:
- darwin
- linux
- windows
- freebsd
goarch:
- amd64
- arm64
- "386"
ignore:
- goos: darwin
goarch: "386"
archives:
- id: provider
formats: [zip]
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- none*
checksum:
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
algorithm: sha256
# No `signs:` block on purpose. GPG signatures are required by the Terraform
# *registry* protocol; a filesystem mirror never checks them. Adding signing
# here would imply a verification step that nothing performs.
changelog:
use: git
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore:"
gitea_urls:
api: https://gitea.coolify.vojtkov.dev/api/v1
download: https://gitea.coolify.vojtkov.dev
release:
gitea:
owner: usr_unknown
name: terraform-provider-dokploy
header: |
## terraform-provider-dokploy {{ .Tag }}
Gitea cannot serve the Terraform registry protocol, so install through a
filesystem mirror:
```bash
VERSION={{ trimprefix .Tag "v" }}
OS_ARCH="$(go env GOOS)_$(go env GOARCH)"
DEST=~/.local/share/terraform/plugins/registry.terraform.io/maxvojtkov/dokploy/$VERSION/$OS_ARCH
mkdir -p "$DEST"
unzip -j terraform-provider-dokploy_${VERSION}_${OS_ARCH}.zip -d "$DEST"
```
Then point Terraform at the mirror -- the exact `~/.terraformrc` block is
printed by `make install`.