Add example plugin build and run main from update-wit
This commit is contained in:
parent
48acc19760
commit
a62dca0239
@ -1,15 +1,16 @@
|
|||||||
name: Release
|
name: Main
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
workflow_call:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
main:
|
||||||
name: Build and release
|
name: Build, test, and release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -29,6 +30,14 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: npm pack
|
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
|
- name: Set GITHUB_RELEASE_TAG & ARTIFACT_ID
|
||||||
run: |
|
run: |
|
||||||
set -eux
|
set -eux
|
||||||
8
.github/workflows/update-wit.yml
vendored
8
.github/workflows/update-wit.yml
vendored
@ -4,11 +4,12 @@ on:
|
|||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-wit:
|
update-wit:
|
||||||
name: Update WIT
|
name: Update WIT
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-slim
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
@ -37,3 +38,8 @@ jobs:
|
|||||||
git add wit
|
git add wit
|
||||||
git commit -m "Sync to Pumpkin-MC/pumpkin-plugin-wit@${witCommit}"
|
git commit -m "Sync to Pumpkin-MC/pumpkin-plugin-wit@${witCommit}"
|
||||||
git push
|
git push
|
||||||
|
|
||||||
|
main:
|
||||||
|
name: Build, test, and release
|
||||||
|
needs: update-wit
|
||||||
|
uses: ./.github/workflows/main.yml
|
||||||
|
|||||||
5
example/package.json
Normal file
5
example/package.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"scripts": {
|
||||||
|
"build": "pumpkin-plugin-build my-plugin.ts build/plugin.wasm"
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user