chore(flake): update flake.lock #28
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: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: Setup Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| with: | |
| use-flakehub: disabled | |
| use-gha-cache: enabled | |
| - name: Run Tests | |
| run: | | |
| nix develop --command go tool ginkgo run -r \ | |
| -coverprofile=coverage.out -covermode=atomic ./... | |
| - name: Run Octocov | |
| uses: k1LoW/octocov-action@v1 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| build: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| timeout-minutes: 60 | |
| env: | |
| ARTIFACT_NAME: sqlc-gen-json.wasm | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install Nix | |
| uses: DeterminateSystems/nix-installer-action@v22 | |
| - name: Setup Nix Cache | |
| uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| with: | |
| use-flakehub: disabled | |
| use-gha-cache: enabled | |
| - name: Build WASM with Nix | |
| run: nix build .#wasm | |
| - name: Prepare Artifacts | |
| run: | | |
| install -m 0644 result/bin/sqlc-gen-json.wasm "$ARTIFACT_NAME" | |
| sha256sum "$ARTIFACT_NAME" > "$ARTIFACT_NAME.sha256" | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ${{ env.ARTIFACT_NAME }} | |
| path: | | |
| ${{ env.ARTIFACT_NAME }} | |
| ${{ env.ARTIFACT_NAME }}.sha256 | |
| if-no-files-found: error | |
| retention-days: 1 | |
| release: | |
| needs: build | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| release_created: ${{ steps.release.outputs.release_created }} | |
| tag_name: ${{ steps.release.outputs.tag_name }} | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create Release PR | |
| id: release | |
| uses: googleapis/release-please-action@v5 | |
| with: | |
| manifest-file: .github/config/release-please-manifest.json | |
| config-file: .github/config/release-please-config.json | |
| target-branch: main | |
| publish: | |
| needs: release | |
| if: needs.release.outputs.release_created | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Download WASM Artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: sqlc-gen-json.wasm | |
| path: release/ | |
| - name: Upload Release Assets | |
| uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ needs.release.outputs.tag_name }} | |
| files: release/* |