Skip to content

Commit

Permalink
Remove goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
g3force committed Apr 16, 2023
1 parent 3937a45 commit 8a23f22
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 55 deletions.
49 changes: 41 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,43 @@ jobs:
path: coverage.html
destination: coverage

build_go:
resource_class: large
docker:
- image: cimg/go:1.20.2
steps:
- checkout
- attach_workspace:
at: .
- run: go get -v -t -d ./...
- run: |
set -u
version=${CIRCLE_TAG:-}
for cmd in << pipeline.parameters.cmds >>; do
GOOS=linux GOARCH=amd64 go build -o ./release/${cmd}_${version}_linux_amd64 ./cmd/${cmd}
GOOS=linux GOARCH=arm64 go build -o ./release/${cmd}_${version}_linux_arm64 ./cmd/${cmd}
GOOS=linux GOARCH=arm go build -o ./release/${cmd}_${version}_linux_arm ./cmd/${cmd}
GOOS=darwin GOARCH=amd64 go build -o ./release/${cmd}_${version}_darwin_amd64 ./cmd/${cmd}
GOOS=darwin GOARCH=arm64 go build -o ./release/${cmd}_${version}_darwin_arm64 ./cmd/${cmd}
GOOS=windows GOARCH=amd64 go build -o ./release/${cmd}_${version}_windows_amd64.exe ./cmd/${cmd}
done
- persist_to_workspace:
root: .
paths:
- release/*

publish_gh:
resource_class: small
docker:
- image: cimg/go:1.20.2
steps:
- attach_workspace:
at: .
- run: |
set -u
go install github.com/tcnksm/[email protected]
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -delete -generatenotes ${CIRCLE_TAG} ./release
build_docker:
resource_class: small
docker:
Expand Down Expand Up @@ -51,22 +88,18 @@ jobs:
docker push robocupssl/${cmd}:${TAG}
done
release:
docker:
- image: cimg/go:1.18
steps:
- checkout
- run: curl -sfL https://goreleaser.com/static/run | bash

workflows:
version: 2
build:
jobs:
- test_go
release:
jobs:
- release:
- build_go:
filters: { branches: { ignore: /.*/ }, tags: { only: /^v.*/ } }
- publish_gh:
context: github
requires: [ build_go ]
filters: { branches: { ignore: /.*/ }, tags: { only: /^v.*/ } }
docker:
jobs:
Expand Down
47 changes: 0 additions & 47 deletions .goreleaser.yaml

This file was deleted.

0 comments on commit 8a23f22

Please sign in to comment.