Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Commit

Permalink
Merge pull request #24 from ava-labs/github-actions-upload
Browse files Browse the repository at this point in the history
GoReleaser
  • Loading branch information
patrick-ogrady authored Mar 10, 2022
2 parents a8a7b52 + 21f41c4 commit e0d273a
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 13 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/build-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ on:
push:
branches:
- main
tags:
- "*"
pull_request:

permissions:
contents: read
contents: write

jobs:
build_test_release:
Expand All @@ -26,12 +28,13 @@ jobs:
run: scripts/tests.unit.sh
- name: Run e2e tests
shell: bash
run: scripts/tests.e2e.sh 1.7.4
# - name: Run GoReleaser for cross-platform builds
# uses: goreleaser/goreleaser-action@v2
# with:
# distribution: goreleaser
# version: latest
# # TODO: automate github release page announce and artifact uploads?
# # https://goreleaser.com/cmd/goreleaser_release/
# args: release --rm-dist --skip-announce --skip-publish
run: scripts/tests.e2e.sh 1.7.6
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34 changes: 31 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ A command-line interface to manage [Avalanche Subnets](https://docs.avax.network

## Install

### Source
```bash
git clone https://github.com/ava-labs/subnet-cli.git;
cd subnet-cli;
Expand All @@ -13,6 +14,35 @@ go install -v .;
Once you have installed `subnet-cli`, check the help page to confirm it is
working as expected (_make sure your $GOBIN is in your $PATH_):

### Pre-Built Binaries
```bash
VERSION=0.0.1 # Populate latest here

GOARCH=$(go env GOARCH)
GOOS=$(go env GOOS)
DOWNLOAD_PATH=/tmp/subnet-cli.tar.gz
DOWNLOAD_URL=https://github.com/ava-labs/subnet-cli/releases/download/v${VERSION}/subnet-cli_${VERSION}_linux_${GOARCH}.tar.gz
if [[ ${GOOS} == "darwin" ]]; then
DOWNLOAD_URL=https://github.com/ava-labs/subnet-cli/releases/download/v${VERSION}/subnet-cli_${VERSION}_darwin_${GOARCH}.tar.gz
fi

rm -f ${DOWNLOAD_PATH}
rm -f /tmp/subnet-cli

echo "downloading subnet-cli ${VERSION} at ${DOWNLOAD_URL}"
curl -L ${DOWNLOAD_URL} -o ${DOWNLOAD_PATH}

echo "extracting downloaded subnet-cli"
tar xzvf ${DOWNLOAD_PATH} -C /tmp

/tmp/subnet-cli -h

# OR
# mv /tmp/subnet-cli /usr/bin/subnet-cli
# subnet-cli -h
```

## Usage
```bash
subnet-cli CLI

Expand All @@ -37,16 +67,14 @@ Flags:
Use "subnet-cli [command] --help" for more information about a command.
```

## Ledger Support
#### Ledger Support
To use your [Ledger](https://www.ledger.com) with `subnet-cli`, just add the
`-l`/`--ledger` flag to any command below.

Make sure you've downloaded the latest version of the
[Avalanche Ledger App](https://docs.avax.network/learn/setup-your-ledger-nano-s-with-avalanche)
first!

## Usage

The following commands will walk you through creating a subnet on Fuji.

### `subnet-cli create VMID`
Expand Down

0 comments on commit e0d273a

Please sign in to comment.