|
2 | 2 |
|
3 | 3 | set -euo pipefail |
4 | 4 |
|
5 | | -./semantic-release --ghr --version-file --prerelease |
| 5 | +./semantic-release --version-file --hooks goreleaser --prerelease |
6 | 6 | export VERSION=$(cat .version) |
7 | 7 |
|
8 | | -export CGO_ENABLED=0 |
9 | | -gox -parallel 4 -osarch="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X main.SRVERSION=$VERSION" -output="bin/{{.Dir}}_v"$VERSION"_{{.OS}}_{{.Arch}}" ./cmd/semantic-release/ |
10 | | - |
11 | | -cd bin/ && shasum -a 256 * > ./semantic-release_v${VERSION}_checksums.txt && cd - |
12 | | -ghr $(cat .ghr) bin/ |
13 | | - |
14 | | -# docker build |
15 | | -export IMAGE_NAME="ghcr.io/go-semantic-release/semantic-release" |
16 | | -export IMAGE_NAME_VERSION="$IMAGE_NAME:$VERSION" |
17 | | -export GL_IMAGE_NAME="registry.gitlab.com/go-semantic-release/semantic-release" |
18 | | -export GL_IMAGE_NAME_VERSION="$GL_IMAGE_NAME:$VERSION" |
19 | | - |
20 | | -docker build --build-arg VERSION=$VERSION --label "org.opencontainers.image.source=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" --label "org.opencontainers.image.version=$VERSION" --label "org.opencontainers.image.revision=$GITHUB_SHA" --label "org.opencontainers.image.created=$(date --rfc-3339 ns)" --label "org.opencontainers.image.title=semantic-release" --label "org.opencontainers.image.license=MIT" -t $IMAGE_NAME_VERSION . |
21 | | -docker tag $IMAGE_NAME_VERSION $IMAGE_NAME |
22 | | -docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME |
23 | | -docker tag $IMAGE_NAME_VERSION $GL_IMAGE_NAME_VERSION |
24 | | - |
25 | | -# push to GitHub Docker Registry |
26 | | -docker push $IMAGE_NAME_VERSION |
27 | | -docker push $IMAGE_NAME |
28 | | - |
29 | | -# push to GitLab Docker Registry |
30 | | -docker push $GL_IMAGE_NAME_VERSION |
31 | | -docker push $GL_IMAGE_NAME |
32 | | - |
33 | 8 | # publish npm package |
34 | 9 | echo "installing npm-binary-releaser..." |
35 | 10 | curl -SL https:/get-release.xyz/christophwitzko/npm-binary-releaser/linux/amd64 > ./npm-binary-releaser |
36 | 11 | chmod +x ./npm-binary-releaser |
37 | 12 | ./npm-binary-releaser --version |
38 | | -./npm-binary-releaser -n go-semantic-release -r "$VERSION" --homepage "https://github.com/go-semantic-release/semantic-release" --license MIT --package-name-prefix "@go-semantic-release/" --no-prefix-for-main-package --publish |
| 13 | + |
| 14 | +./npm-binary-releaser -i ./dist \ |
| 15 | + -n go-semantic-release \ |
| 16 | + -r "$VERSION" \ |
| 17 | + --homepage "https://github.com/go-semantic-release/semantic-release" \ |
| 18 | + --license MIT \ |
| 19 | + --package-name-prefix "@go-semantic-release/" \ |
| 20 | + --no-prefix-for-main-package \ |
| 21 | + --publish |
0 commit comments