fix examples #17
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: latest | |
| - uses: extractions/setup-just@v2 | |
| - uses: bufbuild/buf-action@v1 | |
| with: | |
| setup_only: true | |
| - name: Install Javy | |
| run: | | |
| curl -L https://github.com/bytecodealliance/javy/releases/download/v8.0.0/javy-x86_64-linux-v8.0.0.gz -o javy.gz | |
| gunzip javy.gz | |
| chmod +x javy | |
| sudo mv javy /usr/local/bin/javy | |
| - name: Install dependencies | |
| run: bun install | |
| - name: Run unit tests | |
| run: just test | |
| - name: Build WASM plugin | |
| run: just plugin-wasm && mv examples/plugin.wasm sqlc-gen-typescript.wasm | |
| - name: Calculate SHA256 | |
| id: sha256 | |
| run: | | |
| SHA256=$(sha256sum sqlc-gen-typescript.wasm | awk '{print $1}') | |
| echo "sha256=$SHA256" >> $GITHUB_OUTPUT | |
| echo "SHA256: $SHA256" | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: sqlc-gen-typescript.wasm | |
| body: | | |
| ## sqlc-gen-typescript WASM Plugin | |
| **SHA256:** `${{ steps.sha256.outputs.sha256 }}` | |
| ### Usage | |
| Add this to your `sqlc.yaml`: | |
| ```yaml | |
| plugins: | |
| - name: ts | |
| wasm: | |
| url: https://github.com/pagerguild/sqlc-gen-typescript/releases/download/${{ github.ref_name }}/sqlc-gen-typescript.wasm | |
| sha256: ${{ steps.sha256.outputs.sha256 }} | |
| ``` | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |