Skip to content

Commit 74e5af5

Browse files
committed
feat: automatic release of the plugin on tagging
1 parent 6efc624 commit 74e5af5

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,30 @@ jobs:
2222
- run: sqlc diff
2323
working-directory: examples
2424

25-
- uses: actions/upload-artifact@v3
25+
- name: Generate checksum
26+
id: checksum
27+
run: |-
28+
echo "sha256=$(sha256sum bin/sqlc-gen-python.wasm | awk '{ print $1 }')" >> $GITHUB_OUTPUT
29+
30+
- uses: actions/upload-artifact@v4
2631
with:
2732
name: sqlc-gen-python
28-
path: plugin/sqlc-gen-python.wasm
33+
path: bin/sqlc-gen-python.wasm
34+
35+
- name: Release the build on tag
36+
uses: softprops/action-gh-release@v1
37+
if: startsWith(github.ref, 'refs/tags/')
38+
with:
39+
body: |
40+
# Configuration
41+
```yaml
42+
version: '2'
43+
plugins:
44+
- name: py
45+
wasm:
46+
url: ${{ github.server_url }}/${{ github.repository}}/releases/download/${{ github.ref_name }}/sqlc-gen-python.wasm
47+
sha256: ${{ steps.checksum.outputs.sha256 }}
48+
```
49+
generate_release_notes: true
50+
files: |
51+
bin/sqlc-gen-python.wasm

0 commit comments

Comments
 (0)