Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,9 @@ jobs:
with:
sqlc-version: '1.24.0'
- uses: actions/setup-node@v4
- run: wget https://github.com/bytecodealliance/javy/releases/download/v1.2.0/javy-x86_64-linux-v1.2.0.gz
- run: gzip -d javy-x86_64-linux-v1.2.0.gz
- run: chmod +x javy-x86_64-linux-v1.2.0
- run: npm install
- run: npx tsc --noEmit
- run: npx esbuild --bundle src/app.ts --tree-shaking=true --format=esm --target=es2020 --outfile=out.js
- run: ./javy-x86_64-linux-v1.2.0 compile out.js -o examples/plugin.wasm
- run: sqlc -f sqlc.dev.yaml diff
working-directory: examples
- name: Build
run: |
make generate
- uses: actions/upload-artifact@v4
with:
name: plugin
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: Release
on:
workflow_run:
workflows: ["ci", "examples"]
branches: [main]
types:
- completed
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Build project
run: |
make examples/plugin.wasm
- name: Bump version and push tag
uses: anothrNick/github-tag-action@1.75.0
id: version
env:
GITHUB_TOKEN: ${{ github.token }}
WITH_V: true
DEFAULT_BUMP: patch
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
RELEASE_BRANCHES: main
- name: Create release
id: create_release
uses: actions/github-script@v8
if: ${{ steps.version.outputs.new_tag }}
env:
RELEASE_TAG: ${{ steps.version.outputs.new_tag }}
with:
script: |
try {
await github.rest.repos.createRelease({
draft: false,
generate_release_notes: true,
name: process.env.RELEASE_TAG,
owner: context.repo.owner,
prerelease: false,
repo: context.repo.repo,
tag_name: process.env.RELEASE_TAG,
});
} catch (error) {
core.setFailed(error.message);
}
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./examples/plugin.wasm
asset_name: plugin.wasm
asset_content_type: application/wasm