diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..38f83b8 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,46 @@ +name: Build and push a new release + +on: + push: + tags: + - "*" + +jobs: + build: + name: GoReleaser build + runs-on: ubuntu-latest + + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + with: + fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ + + - name: Set up Go 1.15 + uses: actions/setup-go@v2 + with: + go-version: 1.15 + id: go + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + workdir: ./ + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # push_to_registry: + # name: Push image to docker hub + # runs-on: ubuntu-latest + # steps: + # - name: checkout + # uses: actions/checkout@v2 + # - name: Build and push to docker hub + # uses: docker/build-push-action@v1 + # with: + # username: ${{ secrets.DOCKER_USERNAME }} + # password: ${{ secrets.DOCKER_PASSWORD }} + # repository: ministryofjustice/cloud-platform-cli + # tag_with_ref: true diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index f76ab2d..4750784 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,10 +11,10 @@ jobs: runs-on: ${{ matrix.os }} steps: - - name: Set up Go 1.14 + - name: Set up Go 1.15 uses: actions/setup-go@v2 with: - go-version: 1.14 + go-version: 1.15 - name: Check out code uses: actions/checkout@v2 diff --git a/README.md b/README.md index 007fca3..82899e1 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,24 @@ [![GitHub release](https://img.shields.io/github/release/jasonbirchall/crypto-tracker.svg)](https://GitHub.com/jasonbirchall/crypto-tracker/releases/) [![GitHub issues](https://img.shields.io/github/issues/jasonbirchall/crypto-tracker.svg)](https://GitHub.com/jasonbirchall/crypto-tracker/issues/) -The intention of this project is to provide a simple, robust application to display the price of popular crypto currency written in Go. +Crypto-tracker is a command-line tool to provide a simple, robust application to display the price of popular crypto currency written in Go. ## Install +These installation instructions are written for a Linux system. If you have a different kind of +computer, please amend the steps appropriately. + +Please substitute the latest release number. You can see the latest release +number in the badge near the top of this page, and all available releases on +[this page][github ui]. + +``` +RELEASE=0.1.0 +wget https://github.com/jasonbirchall/crypto-tracker/releases/download/${RELEASE}/crypto-tracker-${RELEASE}.zip +tar xzvf crypto-tracker-${RELEASE}.zip +mv crypto /usr/local/bin/ +``` + ## Usage ## Develop diff --git a/makefile b/makefile index bb9e418..f5b2aa9 100644 --- a/makefile +++ b/makefile @@ -12,7 +12,7 @@ crypto-tracker: $(SOURCE_FILES) GIT_COMMIT=$$(git rev-list -1 HEAD) && CGO_ENABLED=0 go build -ldflags "-s -w -X github.com/jasonbirchall/crypto-tracker/pkg/version.REVISION=$(GIT_COMMIT)" -a -o ./crypto ./main.go run-tracker: - go run main.go track + go run main.go track --coin btc,eth test: go test -v ./...