feat: add zip packaging target and woodpecker release pipeline

- Makefile gains `make package` target that builds and zips the provider
  binary in the format expected by artifactapi's local terraform registry:
  terraform-provider-artifactapi_{version}_{os}_{arch}.zip
- New .woodpecker/release.yml pipeline triggers on tag push, builds the
  zip, and uploads it to artifactapi via the local files API
- Secrets: artifactapi_url and artifactapi_repo
This commit is contained in:
2026-06-22 23:33:22 +10:00
parent 7c94f06be6
commit 7657b89201
2 changed files with 31 additions and 3 deletions
+21
View File
@@ -0,0 +1,21 @@
when:
- event: tag
steps:
- name: package
image: golang:1.25
commands:
- apt-get update && apt-get install -y zip
- make package VERSION=${CI_COMMIT_TAG}
- name: upload
image: curlimages/curl:latest
secrets: [artifactapi_url, artifactapi_repo]
commands:
- |
VERSION=$(echo ${CI_COMMIT_TAG} | sed 's/^v//')
FILE="terraform-provider-artifactapi_${VERSION}_linux_amd64.zip"
curl -f -X PUT \
"$${ARTIFACTAPI_URL}/api/v2/remotes/$${ARTIFACTAPI_REPO}/files/unkin/artifactapi/$${FILE}" \
-H "Content-Type: application/zip" \
--data-binary @"$${FILE}"