Fix release workflow for CGO builds #18
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: CI | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Setup pnpm | |
| run: | | |
| corepack enable | |
| corepack prepare [email protected] --activate | |
| pnpm --version | |
| - name: Install build dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y --no-install-recommends build-essential | |
| - name: pnpm format:check | |
| run: pnpm -s format:check | |
| - name: pnpm lint | |
| run: pnpm -s lint | |
| - name: pnpm test | |
| env: | |
| CGO_ENABLED: "1" | |
| run: pnpm -s test | |
| - name: pnpm build | |
| env: | |
| CGO_ENABLED: "1" | |
| run: pnpm -s build |