Skip to content

Commit

Permalink
feat: automatic release of the plugin on tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinvalk committed Feb 21, 2024
1 parent 6efc624 commit 74e5af5
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,30 @@ jobs:
- run: sqlc diff
working-directory: examples

- uses: actions/upload-artifact@v3
- 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: plugin/sqlc-gen-python.wasm
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

0 comments on commit 74e5af5

Please sign in to comment.