Skip to content

Commit

Permalink
adding circleci builds
Browse files Browse the repository at this point in the history
  • Loading branch information
fractalyse committed Oct 30, 2021
1 parent f709408 commit 7328c35
Showing 1 changed file with 61 additions and 8 deletions.
69 changes: 61 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,70 @@
# Golang CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-go/ for more details
#
# Credit Fractalyse (CuBe)
#
version: 2.1
jobs:
build:

docker:
- image: circleci/golang:1.14

working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}}
- image: circleci/golang:1.16.9
steps:
- checkout
- run:
name: "Compile"
command:
make geth
prerelease:
docker:
- image: circleci/golang:1.16.9
steps:
- checkout
- run:
name: "Compile"
command: make geth
- run:
name: "Make tar PreRelease and publish"
command: |
cd build/bin
VERSION=$(./geth version | grep "^Version:" | cut -d' ' -f2 | cut -d'-' -f1)
echo $VERSION
tar -cvjf etho-linux-V${VERSION}-test.tar.gz geth && rm geth
go get github.com/tcnksm/ghr
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -delete -n "${CIRCLE_BRANCH}" -b "***FOR TESTING PURPOSE ONLY***" --prerelease "V${VERSION}-test" ./
release:
docker:
- image: circleci/golang:1.16.9
steps:
- checkout
# specify any bash command here prefixed with `run: `
- run: make geth && cd build/bin && sudo apt-get install zip && zip ether-1-linux-1.3.2.zip geth
- store_artifacts:
path: build/bin/
- run:
name: "Make tar Release and publish"
command: |
make geth
cd build/bin
VERSION=$(./geth version | grep "^Version:" | cut -d' ' -f2 | cut -d'-' -f1)
echo $VERSION
tar -cvjf etho-linux-V${VERSION}.tar.gz geth && rm geth
go get github.com/tcnksm/ghr
ghr -t "${GITHUB_TOKEN}" -u "${CIRCLE_PROJECT_USERNAME}" -r "${CIRCLE_PROJECT_REPONAME}" -c "${CIRCLE_SHA1}" -delete "V${VERSION}" ./
workflows:
version: 2.1
main:
jobs:
- build:
filters:
branches:
ignore:
- HyperCube-testnet
- master
- fix-circleci-builds
- prerelease:
filters:
branches:
only:
- HyperCube-testnet
- release:
filters:
branches:
only:
- master

0 comments on commit 7328c35

Please sign in to comment.