File tree Expand file tree Collapse file tree 3 files changed +8
-14
lines changed
Expand file tree Collapse file tree 3 files changed +8
-14
lines changed Original file line number Diff line number Diff line change 3232 go-version : 1.15
3333 - uses : actions/checkout@v2
3434 - run : go build ./cmd/semantic-release/
35+ env :
36+ CGO_ENABLED : 0
3537 - run : go test -v ./...
3638 - run : ./semantic-release --dry --allow-no-changes --no-ci
3739 env :
Original file line number Diff line number Diff line change 1- FROM golang:alpine AS builder
2- ARG VERSION
3-
1+ FROM alpine AS certs
42RUN apk update && apk add --no-cache git ca-certificates && update-ca-certificates
53
6- WORKDIR $GOPATH/src/semantic-release
7- COPY . .
8-
9- RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -a --installsuffix cgo -ldflags="-extldflags '-static' -s -w -X main.SRVERSION=$VERSION" -o /go/bin/semantic-release ./cmd/semantic-release/
10-
11-
124FROM scratch
5+ ARG VERSION
136
14- COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
15- COPY --from=builder /go/ bin/semantic-release /
7+ COPY --from=certs /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
8+ COPY "./ bin/semantic-release_v${VERSION}_linux_amd64" /semantic-release
169
1710ENTRYPOINT ["/semantic-release" ]
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- set -e
4-
5- CGO_ENABLED=0
3+ set -euo pipefail
64
75./semantic-release --ghr --version-file --prerelease -u ./npm-package/package.json
86export VERSION=$( cat .version)
97
8+ export CGO_ENABLED=0
109gox -parallel 4 -osarch=" linux/amd64 darwin/amd64 linux/arm windows/amd64" -ldflags=" -extldflags '-static' -s -w -X main.SRVERSION=$VERSION " -output=" bin/{{.Dir}}_v" $VERSION " _{{.OS}}_{{.Arch}}" ./cmd/semantic-release/
1110
1211cd bin/ && shasum -a 256 * > ./semantic-release_v${VERSION} _checksums.txt && cd -
You can’t perform that action at this time.
0 commit comments