test release with cgo uchardet #15
Workflow file for this run
This file contains hidden or 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: | |
| push: | |
| tags: | |
| - '*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| goreleaser: | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| setup: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential gcc-multilib libuchardet-dev | |
| cc: gcc | |
| cxx: g++ | |
| - os: windows-latest | |
| setup: | | |
| choco install mingw | |
| choco install uchardet | |
| choco install pkg-config | |
| refreshenv | |
| cc: gcc | |
| cxx: g++ | |
| - os: macos-latest | |
| setup: | | |
| brew install gcc | |
| brew install uchardet | |
| cc: gcc-13 | |
| cxx: g++-13 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install build dependencies | |
| run: ${{ matrix.setup }} | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.21' | |
| - name: Run GoReleaser | |
| uses: goreleaser/goreleaser-action@v6 | |
| with: | |
| distribution: goreleaser | |
| version: latest | |
| args: release --clean | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CGO_ENABLED: 1 | |
| CC: ${{ matrix.cc }} | |
| CXX: ${{ matrix.cxx }} | |
| CGO_CFLAGS: -static | |
| CGO_LDFLAGS: -static | |
| GOFLAGS: -tags=uchardet |