Add example plugin build and run main from update-wit

This commit is contained in:
Demetrius Kanios 2026-08-03 16:53:34 -07:00
parent 48acc19760
commit a62dca0239
3 changed files with 24 additions and 4 deletions

View File

@ -1,15 +1,16 @@
name: Release
name: Main
on:
push:
workflow_dispatch:
workflow_call:
permissions:
contents: write
pull-requests: write
jobs:
release:
name: Build and release
main:
name: Build, test, and release
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -29,6 +30,14 @@ jobs:
- name: Build
run: npm pack
- name: Build example plugin to test
run: |
set -eux
cd example
npm install ../*.tgz
npm run build
- name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID
run: |
set -eux

View File

@ -4,11 +4,12 @@ on:
permissions:
contents: write
pull-requests: write
jobs:
update-wit:
name: Update WIT
runs-on: ubuntu-latest
runs-on: ubuntu-slim
steps:
- name: Checkout
uses: actions/checkout@v6
@ -37,3 +38,8 @@ jobs:
git add wit
git commit -m "Sync to Pumpkin-MC/pumpkin-plugin-wit@${witCommit}"
git push
main:
name: Build, test, and release
needs: update-wit
uses: ./.github/workflows/main.yml

5
example/package.json Normal file
View File

@ -0,0 +1,5 @@
{
"scripts": {
"build": "pumpkin-plugin-build my-plugin.ts build/plugin.wasm"
}
}