Do not build binaries for windows (#43) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'goreleaser' | |
on: | |
pull_request: | |
types: [ opened, synchronize, reopened ] | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
- release/v* | |
paths-ignore: | |
- '.github/**' | |
- 'docs/**' | |
- 'examples/**' | |
- 'test/**' | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: false | |
permissions: {} | |
jobs: | |
build: | |
name: 'Build Binaries' | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout the repo | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Setup Go | |
- name: 'Setup Go' | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
# Print Go version | |
- run: go version | |
# Trial build | |
- name: Test build | |
if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && github.ref_name != 'main') | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: release --config ./.goreleaser.yml --clean --snapshot | |
release: | |
if: github.event_name == 'push' | |
needs: build | |
uses: cloudposse/.github/.github/workflows/shared-go-auto-release.yml@main | |
with: | |
publish: true | |
secrets: inherit |