anura build support #135
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build Wispcraft | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: latest | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "22" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Pack Wispcraft | |
run: pnpm pack | |
- name: Upload Artifact (pnpm pack) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: packaged-wispcraft | |
path: wispcraft-*.tgz | |
- name: Upload Artifact (dist) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wispcraft | |
path: | | |
dist/*.js | |
dist/*.js.map | |
dist/*.html | |
upload: | |
name: Upload release | |
runs-on: ubuntu-latest | |
needs: [build] | |
permissions: write-all | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Delete old release and tag | |
uses: dev-drprasad/delete-tag-and-release@v1.1 | |
with: | |
delete_release: true | |
tag_name: latest | |
github_token: ${{ github.token }} | |
- name: Get artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: wispcraft | |
path: dist | |
- name: Release to GitHub | |
uses: ncipollo/release-action@v1 | |
with: | |
name: Continuous Build | |
tag: latest | |
commit: main | |
body: "${{ github.event.head_commit.url }} ${{ github.event.head_commit.message }}" | |
artifacts: "dist/*.js,dist/*.js.map,dist/*.html" | |
prerelease: true |