You've already forked go-semantic-release
107 lines
3.0 KiB
YAML
107 lines
3.0 KiB
YAML
variables:
|
|
- &platforms 'linux/arm64,linux/amd64'
|
|
- &docker_creds
|
|
username:
|
|
from_secret: hub_username_cybercinch
|
|
password:
|
|
from_secret: docker_password_cybercinch
|
|
- &pypi_creds
|
|
username:
|
|
from_secret: hub_username_cybercinch
|
|
password:
|
|
from_secret: docker_password_cybercinch
|
|
clone:
|
|
git:
|
|
image: woodpeckerci/plugin-git
|
|
settings:
|
|
partial: false
|
|
tags: true
|
|
|
|
steps:
|
|
build-release:
|
|
image: docker.io/cybercinch/go-semrelease:golang1.20
|
|
pull: true
|
|
commands:
|
|
- >
|
|
GOOS=linux
|
|
GOARCH=amd64
|
|
CGO_ENABLED=0
|
|
go build -o build/go-semantic-release.linux_x86_64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
|
./cmd/go-semantic-release/
|
|
- >
|
|
GOOS=linux
|
|
GOARCH=arm64
|
|
CGO_ENABLED=0
|
|
go build -o build/go-semantic-release.linux_arm64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
|
./cmd/go-semantic-release/
|
|
- >
|
|
GOOS=windows
|
|
GOARCH=386
|
|
CGO_ENABLED=0
|
|
go build -o build/go-semantic-release.windows_i386.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
./cmd/go-semantic-release/
|
|
- >
|
|
GOOS=windows
|
|
GOARCH=amd64
|
|
CGO_ENABLED=0
|
|
go build -o build/go-semantic-release.windows_x86_64.exe -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
./cmd/go-semantic-release/
|
|
- >
|
|
GOOS=darwin
|
|
GOARCH=amd64
|
|
CGO_ENABLED=0
|
|
go build -o build/go-semantic-release.darwin_x86_64 -ldflags "-w -s -X main.version=`go-semantic-release next`"
|
|
./cmd/go-semantic-release/
|
|
- go-semantic-release --loglevel debug release # Actually make the release on Gitea. Uploading assets
|
|
environment:
|
|
GITEA_TOKEN:
|
|
from_secret: gitea_token
|
|
GITEA_URL:
|
|
from_secret: gitea_server_url
|
|
when:
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
event:
|
|
- push
|
|
- manual
|
|
|
|
# publish-docker-tagged:
|
|
# image: docker.io/cybercinch/woodpecker-plugin-depot
|
|
# pull: true
|
|
# settings:
|
|
# <<: *docker_creds
|
|
# token:
|
|
# from_secret: depot_token
|
|
# repohost: hub.cybercinch.nz
|
|
# repo: cybercinch/${CI_REPO_NAME}
|
|
# project:
|
|
# from_secret: depot_project
|
|
# dockerfile: Dockerfile
|
|
# push: true
|
|
# platforms: *platforms
|
|
# tags: ["latest", "$CI_COMMIT_TAG"]
|
|
# when:
|
|
# branch: ${CI_REPO_DEFAULT_BRANCH}
|
|
# event:
|
|
# - tag
|
|
|
|
publish-docker-develop:
|
|
image: docker.io/cybercinch/woodpecker-plugin-depot
|
|
pull: true
|
|
settings:
|
|
<<: *docker_creds
|
|
token:
|
|
from_secret: depot_token
|
|
repohost: hub.cybercinch.nz
|
|
repo: cybercinch/${CI_REPO_NAME}
|
|
project:
|
|
from_secret: depot_project
|
|
dockerfile: Dockerfile.dev
|
|
push: true
|
|
platforms: linux/amd64
|
|
tags: ["develop"]
|
|
when:
|
|
branch: develop
|
|
event:
|
|
- push
|
|
- manual
|