chore: add gh to devShell #1
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] | |
| tags: ["v*"] | |
| pull_request: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| nix-eval: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| flakehub: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| - run: nix develop --command nix flake check --no-build --print-build-logs | |
| lint: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| flakehub: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| - run: nix develop --command npm ci | |
| - run: nix develop --command sh -c 'npx eslint . && npx prettier --check .' | |
| typecheck: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| flakehub: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| - run: nix develop --command npm ci | |
| - run: nix develop --command npx tsc --noEmit | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| flakehub: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| - run: nix develop --command npm ci | |
| - run: nix develop --command npx vitest run | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: DeterminateSystems/nix-installer-action@v22 | |
| with: | |
| flakehub: false | |
| - uses: DeterminateSystems/magic-nix-cache-action@v14 | |
| - run: nix develop --command npm ci | |
| - run: nix develop --command npx vite build | |
| windows: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-node@v7 | |
| with: | |
| node-version: "22" | |
| - run: npm ci | |
| - run: npx eslint . && npx prettier --check . | |
| shell: bash | |
| - run: npx tsc --noEmit | |
| shell: bash | |
| - run: npx vitest run | |
| shell: bash | |
| - run: npx vite build | |
| shell: bash | |
| release: | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| needs: [nix-eval, lint, typecheck, test, build, windows] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: gh release delete "${{ github.ref_name }}" --yes || true | |
| - uses: softprops/action-gh-release@v3 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| generate_release_notes: true | |
| make_latest: true |