From 97611fddaa414f53713597918c5e954646cb8623 Mon Sep 17 00:00:00 2001 From: Alex Bice Date: Sun, 26 Mar 2023 14:37:20 -0700 Subject: [PATCH] test releases (#185) --- .github/workflows/release.yml | 12 +++------- .github/workflows/release_check.yml | 35 +++++++++++++++++++++++++++++ .goreleaser.yml | 6 ----- 3 files changed, 38 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/release_check.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d36ccdc..9372015 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -17,15 +17,9 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: 1.20 - - - name: Cache Go modules - uses: actions/cache@v3 - with: - path: ~/go/pkg/mod - key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} - restore-keys: | - ${{ runner.os }}-go- + go-version: ">=1.20.2" + - name: Ensure Go + run: go version - name: Install GoReleaser uses: goreleaser/goreleaser-action@v4 diff --git a/.github/workflows/release_check.yml b/.github/workflows/release_check.yml new file mode 100644 index 0000000..652931b --- /dev/null +++ b/.github/workflows/release_check.yml @@ -0,0 +1,35 @@ +name: goreleaser + +on: + push: {} + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: ">=1.20.2" + - name: Ensure Go + run: go version + + - name: Install GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + install-only: true + - name: Show GoReleaser version + run: goreleaser -v + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v4 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --clean --snapshot diff --git a/.goreleaser.yml b/.goreleaser.yml index f307945..1c2fc12 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,9 +1,3 @@ -before: - hooks: - # You may remove this if you don't use go modules. - - go mod tidy - # you may remove this if you don't need go generate - - go generate ./generator builds: - env: - CGO_ENABLED=0