diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index e4ba920..be86bca 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -7,11 +7,18 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Get Go version + run: echo "GO_VERSION=$(grep 'go \d\.' go.mod | cut -d ' ' -f 2)" >> $GITHUB_ENV + - name: Set up Go uses: actions/setup-go@v3 - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 + with: + go-version: ${{ env.GO_VERSION }} - name: Test run: go test -v ./... diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e2ba986..afeff85 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,15 +12,20 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v3 + with: + fetch-depth: 0 - - name: Checkout submodules - run: git submodule update --init --recursive + - name: Get Go version + run: echo "GO_VERSION=$(grep 'go \d\.' go.mod | cut -d ' ' -f 2)" >> $GITHUB_ENV - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v3 with: - go-version: 1.16 + go-version: ${{ env.GO_VERSION }} + + - name: Checkout submodules + run: git submodule update --init --recursive - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/.github/workflows/sh.yaml b/.github/workflows/sh.yaml index fdd34f5..0dcfb47 100644 --- a/.github/workflows/sh.yaml +++ b/.github/workflows/sh.yaml @@ -7,11 +7,13 @@ jobs: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Set up run: sudo apt-get install -y shellcheck zsh - - name: Check out code into the Go module directory - uses: actions/checkout@v2 - - name: Test run: scripts/test.sh