From a62dca0239d3cb81b21bd911f3ce8b07da03ffed Mon Sep 17 00:00:00 2001 From: Demetrius Kanios Date: Mon, 3 Aug 2026 16:53:34 -0700 Subject: [PATCH] Add example plugin build and run `main` from `update-wit` --- .github/workflows/{release.yml => main.yml} | 15 ++++++++++++--- .github/workflows/update-wit.yml | 8 +++++++- example/package.json | 5 +++++ 3 files changed, 24 insertions(+), 4 deletions(-) rename .github/workflows/{release.yml => main.yml} (87%) create mode 100644 example/package.json diff --git a/.github/workflows/release.yml b/.github/workflows/main.yml similarity index 87% rename from .github/workflows/release.yml rename to .github/workflows/main.yml index abe6947..7ef5c81 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/.github/workflows/update-wit.yml b/.github/workflows/update-wit.yml index 49640ca..2abd55e 100644 --- a/.github/workflows/update-wit.yml +++ b/.github/workflows/update-wit.yml @@ -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 diff --git a/example/package.json b/example/package.json new file mode 100644 index 0000000..bbdb351 --- /dev/null +++ b/example/package.json @@ -0,0 +1,5 @@ +{ + "scripts": { + "build": "pumpkin-plugin-build my-plugin.ts build/plugin.wasm" + } +}