diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index db44400..c966d27 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,4 +1,4 @@ -name: Go +name: Test on: push: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ca53aa9 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + release: + types: + - "published" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + - name: Build + run: make setup + + - name: Test + run: go test -v ./... + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v3 + with: + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 6cc8b32..f492e0f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -11,17 +11,12 @@ builds: - CGO_ENABLED=0 goos: - linux - - windows - darwin - ignore: - - goos: windows - goarch: arm64 archives: - replacements: darwin: Darwin linux: Linux - windows: Windows 386: i386 amd64: x86_64