You've already forked go-semantic-release
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b13699d2f8 | |||
| f7f395c30f | |||
| 0bcede8594 | |||
| 34589749ba | |||
| b38abd00f2 | |||
| 913783cf08 |
10
.release.yml
10
.release.yml
@@ -8,15 +8,15 @@ branch:
|
||||
master: release
|
||||
develop: beta
|
||||
assets:
|
||||
- name: ./build/go-semantic-release.linux_x86_64
|
||||
- path: ./build/go-semantic-release.linux_amd64
|
||||
compress: true
|
||||
- name: ./build/go-semantic-release.linux_arm64
|
||||
- path: ./build/go-semantic-release.linux_arm64
|
||||
compress: true
|
||||
- name: ./build/go-semantic-release.windows_i386.exe
|
||||
- path: ./build/go-semantic-release.windows_i386.exe
|
||||
compress: true
|
||||
- name: ./build/go-semantic-release.windows_x86_64.exe
|
||||
- path: ./build/go-semantic-release.windows_amd64.exe
|
||||
compress: true
|
||||
- name: ./build/go-semantic-release.darwin_x86_64
|
||||
- path: ./build/go-semantic-release.darwin_amd64
|
||||
compress: true
|
||||
changelog:
|
||||
docker:
|
||||
|
||||
@@ -10,6 +10,8 @@ variables:
|
||||
from_secret: hub_username_cybercinch
|
||||
password:
|
||||
from_secret: docker_password_cybercinch
|
||||
- build_args: &build_args
|
||||
- TAG: ${CI_COMMIT_TAG}
|
||||
clone:
|
||||
git:
|
||||
image: woodpeckerci/plugin-git
|
||||
@@ -26,7 +28,7 @@ steps:
|
||||
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`"
|
||||
go build -o build/go-semantic-release.linux_amd64 -ldflags "-w -s --X main.version=`go-semantic-release next`"
|
||||
./cmd/go-semantic-release/
|
||||
- >
|
||||
GOOS=linux
|
||||
@@ -44,13 +46,13 @@ steps:
|
||||
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`"
|
||||
go build -o build/go-semantic-release.windows_amd64.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`"
|
||||
go build -o build/go-semantic-release.darwin_amd64 -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:
|
||||
@@ -64,25 +66,26 @@ steps:
|
||||
- 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-tagged:
|
||||
image: woodpeckerci/plugin-docker-buildx
|
||||
pull: true
|
||||
settings:
|
||||
<<: *docker_creds
|
||||
token:
|
||||
from_secret: depot_token
|
||||
registry: hub.cybercinch.nz
|
||||
repo: cybercinch/${CI_REPO_NAME}
|
||||
dockerfile: Dockerfile
|
||||
platforms: *platforms
|
||||
build_args:
|
||||
- TAG=${CI_COMMIT_TAG}
|
||||
tags:
|
||||
- latest
|
||||
- ${CI_COMMIT_TAG}
|
||||
when:
|
||||
branch: ${CI_REPO_DEFAULT_BRANCH}
|
||||
event:
|
||||
- tag
|
||||
|
||||
publish-docker-develop:
|
||||
image: docker.io/cybercinch/woodpecker-plugin-depot
|
||||
|
||||
26
Dockerfile
26
Dockerfile
@@ -1,20 +1,20 @@
|
||||
FROM golang:1.20
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
COPY . /code/
|
||||
|
||||
RUN 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/
|
||||
|
||||
FROM alpine:3.14
|
||||
ARG TARGETPLATFORM
|
||||
# Set by build-arg
|
||||
ARG TAG=v2.2.3
|
||||
|
||||
# Strip out the prefix
|
||||
ENV PLAT=${TARGETPLATFORM//"linux/"/}
|
||||
|
||||
WORKDIR /code
|
||||
|
||||
COPY ./build/go-semantic-release.linux_x86_64 /usr/local/bin/go-semantic-release
|
||||
ADD https://hub.cybercinch.nz/cybercinch/go-semantic-release/releases/download/${TAG}/go-semantic-release.linux_${PLAT}.zip /tmp
|
||||
RUN apk add --no-cache unzip && \
|
||||
unzip -d /tmp /tmp/go-semantic-release.linux_${PLAT}.zip && \
|
||||
ls && \
|
||||
ls /tmp && \
|
||||
mv /tmp/go-semantic-release.linux_${PLAT} /usr/local/bin/go-semantic-release && \
|
||||
rm -f /tmp/go-semantic-release.linux_${PLAT}.zip
|
||||
|
||||
USER 1000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user