diff --git a/.github/workflows/breakage.yaml b/.github/workflows/breakage.yaml index 9d50baf1..b2a26c0b 100644 --- a/.github/workflows/breakage.yaml +++ b/.github/workflows/breakage.yaml @@ -14,10 +14,8 @@ jobs: - name: Setup env uses: HatsuneMiku3939/direnv-action@v1 - run: | - toolchain=$(cat go.mod | grep toolchain | cut -d ' ' -f 2 | sed 's/go*//') - echo "GOTOOLCHAIN=go${toolchain}" >> $GITHUB_ENV + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') echo "GOVERSION=${toolchain}" >> $GITHUB_ENV - echo "GOROOT=/opt/hostedtoolcache/go/${toolchain}/x64" >> $GITHUB_ENV - uses: actions/setup-go@v4 with: go-version: "${{ env.GOVERSION }}" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f1de4632..c4a7e149 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -17,10 +17,8 @@ jobs: - name: Setup env uses: HatsuneMiku3939/direnv-action@v1 - run: | - toolchain=$(cat go.mod | grep toolchain | cut -d ' ' -f 2 | sed 's/go*//') - echo "GOTOOLCHAIN=go${toolchain}" >> $GITHUB_ENV + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') echo "GOVERSION=${toolchain}" >> $GITHUB_ENV - echo "GOROOT=/opt/hostedtoolcache/go/${toolchain}/x64" >> $GITHUB_ENV - uses: actions/setup-go@v4 with: go-version: "${{ env.GOVERSION }}" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index c67781f5..d560c830 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,10 +14,8 @@ jobs: - name: Setup env uses: HatsuneMiku3939/direnv-action@v1 - run: | - toolchain=$(cat go.mod | grep toolchain | cut -d ' ' -f 2 | sed 's/go*//') - echo "GOTOOLCHAIN=go${toolchain}" >> $GITHUB_ENV + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') echo "GOVERSION=${toolchain}" >> $GITHUB_ENV - echo "GOROOT=/opt/hostedtoolcache/go/${toolchain}/x64" >> $GITHUB_ENV - uses: actions/setup-go@v4 with: go-version: "${{ env.GOVERSION }}" diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index dafc17b9..26b123bf 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -14,10 +14,8 @@ jobs: - name: Setup env uses: HatsuneMiku3939/direnv-action@v1 - run: | - toolchain=$(cat go.mod | grep toolchain | cut -d ' ' -f 2 | sed 's/go*//') - echo "GOTOOLCHAIN=go${toolchain}" >> $GITHUB_ENV + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') echo "GOVERSION=${toolchain}" >> $GITHUB_ENV - echo "GOROOT=/opt/hostedtoolcache/go/${toolchain}/x64" >> $GITHUB_ENV - uses: actions/setup-go@v4 with: go-version: "${{ env.GOVERSION }}" @@ -30,10 +28,8 @@ jobs: - name: Setup env uses: HatsuneMiku3939/direnv-action@v1 - run: | - toolchain=$(cat go.mod | grep toolchain | cut -d ' ' -f 2 | sed 's/go*//') - echo "GOTOOLCHAIN=go${toolchain}" >> $GITHUB_ENV + toolchain=$(./script/tools.sh gotoolchain | sed 's/go*//') echo "GOVERSION=${toolchain}" >> $GITHUB_ENV - echo "GOROOT=/opt/hostedtoolcache/go/${toolchain}/x64" >> $GITHUB_ENV - uses: actions/setup-go@v4 with: go-version: "${{ env.GOVERSION }}" diff --git a/go.mod b/go.mod index 2d4dcd50..db6a09aa 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,6 @@ module github.com/akash-network/akash-api go 1.21 -toolchain go1.21.0 - require ( github.com/99designs/keyring v1.2.1 github.com/btcsuite/btcd/chaincfg/chainhash v1.0.1