From aa0eeec43e8809af8b552f94ba6dd07e4620ecf5 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 9 Mar 2022 19:39:57 -0800 Subject: [PATCH 1/4] run goreleaser --- .github/workflows/build-test-release.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 63b955b..775f8de 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -4,6 +4,8 @@ on: push: branches: - main + tags: + - "*" pull_request: permissions: @@ -27,11 +29,12 @@ jobs: - 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 + - 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 }} From 9cec86c87d67a53c52c83d33c8c60265ca8c8c4c Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 9 Mar 2022 19:40:20 -0800 Subject: [PATCH 2/4] update AGO --- .github/workflows/build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 775f8de..90c517b 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -28,7 +28,7 @@ jobs: run: scripts/tests.unit.sh - name: Run e2e tests shell: bash - run: scripts/tests.e2e.sh 1.7.4 + run: scripts/tests.e2e.sh 1.7.6 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 with: From 27d8db1856733e158b40229b23c22d06da461d08 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 9 Mar 2022 19:42:27 -0800 Subject: [PATCH 3/4] add write perms --- .github/workflows/build-test-release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 90c517b..87c3ca7 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -9,7 +9,7 @@ on: pull_request: permissions: - contents: read + contents: write jobs: build_test_release: From 21f41c4f95b879456900a7f2537afb2c2d94f996 Mon Sep 17 00:00:00 2001 From: Patrick O'Grady Date: Wed, 9 Mar 2022 19:50:33 -0800 Subject: [PATCH 4/4] cleanup README --- README.md | 34 +++++++++++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8dfcb9a..ee580e8 100644 --- a/README.md +++ b/README.md @@ -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; @@ -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 @@ -37,7 +67,7 @@ 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. @@ -45,8 +75,6 @@ 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`