Skip to content

feat: automatic release of the plugin on tagging #7

feat: automatic release of the plugin on tagging

feat: automatic release of the plugin on tagging #7

Workflow file for this run

name: go
on:
push:
tags:
- v*
branches:
- main
pull_request:
jobs:
test:
name: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
# - run: go install github.com/sqlc-dev/sqlc/cmd/sqlc@main
- uses: sqlc-dev/setup-sqlc@v4
with:
sqlc-version: '1.25.0'
- run: make
- run: make test
- run: sqlc diff
working-directory: examples
- name: Generate checksum
id: checksum
run: |-
echo "sha256=$(sha256sum bin/sqlc-gen-python.wasm | awk '{ print $1 }')" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: sqlc-gen-python
path: bin/sqlc-gen-python.wasm
- name: Release the build on tag
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
body: |
# Configuration
```yaml
version: '2'
plugins:
- name: py
wasm:
url: ${{ github.server_url }}/${{ github.repository}}/releases/download/${{ github.ref_name }}/sqlc-gen-python.wasm
sha256: ${{ steps.checksum.outputs.sha256 }}
```
generate_release_notes: true
files: |
bin/sqlc-gen-python.wasm