memories/.circleci/config.yml

49 lines
1.1 KiB
YAML
Raw Normal View History

2022-11-11 04:26:21 +00:00
version: 2.1
jobs:
build:
machine:
image: ubuntu-2004:current
resource_class: arm.medium
steps:
- checkout
- run: |
2023-02-24 08:35:24 +00:00
docker run -it --rm -v "$PWD":/work -w /work golang:1.20-bullseye bash -c 'CGO_ENABLED=0 go build -buildvcs=false -ldflags="-s -w"'
2022-11-11 04:26:21 +00:00
sudo mv go-vod go-vod-aarch64
- persist_to_workspace:
root: .
paths:
- go-vod-aarch64
publish-github-release:
docker:
- image: cimg/go:1.17
steps:
- attach_workspace:
at: ./artifacts
- run:
name: "Publish Release on GitHub"
command: |
go get github.com/tcnksm/ghr
ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -c ${CIRCLE_SHA1} -replace ${CIRCLE_TAG} ./artifacts/
workflows:
aarch64:
jobs:
- build:
filters:
branches:
ignore: /.*/
2022-11-11 04:26:21 +00:00
tags:
only: /^.*/
- publish-github-release:
requires:
- build
filters:
branches:
ignore: /.*/
2022-11-11 04:26:21 +00:00
tags:
only: /^.*/