feat: create zigflow action #8
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: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| id-token: write | |
| packages: write | |
| pages: write | |
| pull-requests: read | |
| jobs: | |
| commitlint: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # fetch-depth is required | |
| - uses: wagoid/commitlint-github-action@v6 | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.x | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ">=1.20.0" | |
| - name: Set up JS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| cache: "npm" | |
| - name: Install dependencies | |
| run: npm ci | |
| - uses: pre-commit/action@v3.0.1 | |
| test: | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Print build information | |
| run: "echo head_ref: ${{ github.head_ref }}, ref: ${{ github.ref }}, os: ${{ matrix.os }}" | |
| - uses: actions/checkout@v6 | |
| - name: Run zigflow/setup-zigflow | |
| uses: ./ | |
| - name: Verify setup | |
| run: zigflow version |