Prepare ReleaseKit hosted-page delivery
This commit is contained in:
30
examples/woodpecker/releasekit-source-delivery.yml
Normal file
30
examples/woodpecker/releasekit-source-delivery.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
when:
|
||||
- event: tag
|
||||
ref: refs/tags/v*
|
||||
|
||||
steps:
|
||||
- name: prepare
|
||||
image: golang:1.25.0-bookworm
|
||||
commands:
|
||||
- |
|
||||
test -n "$${CI_COMMIT_TAG}"
|
||||
test -n "$${CI_COMMIT_SHA}"
|
||||
git fetch origin "refs/tags/$${CI_COMMIT_TAG}:refs/tags/$${CI_COMMIT_TAG}"
|
||||
test "$(git rev-parse "refs/tags/$${CI_COMMIT_TAG}^{commit}")" = "$${CI_COMMIT_SHA}"
|
||||
git checkout --detach "$${CI_COMMIT_SHA}"
|
||||
test "$(git rev-parse HEAD)" = "$${CI_COMMIT_SHA}"
|
||||
mkdir -p "$${CI_WORKSPACE}/.releasekit/bin"
|
||||
|
||||
- name: build-tool
|
||||
image: golang:1.25.0-bookworm
|
||||
commands:
|
||||
- GOTOOLCHAIN=local GOPROXY=off GOSUMDB=off go build -o "$${CI_WORKSPACE}/.releasekit/bin/releasekit" ./cmd/releasekit
|
||||
|
||||
- name: deliver-page
|
||||
image: golang:1.25.0-bookworm
|
||||
environment:
|
||||
RELEASEKIT_GITEA_TOKEN:
|
||||
from_secret: releasekit_gitea_token
|
||||
commands:
|
||||
- |
|
||||
"$${CI_WORKSPACE}/.releasekit/bin/releasekit" deliver --repo "$${CI_WORKSPACE}" "$${CI_COMMIT_TAG}"
|
||||
Reference in New Issue
Block a user