mirror of
https://github.com/elladunbar/tree-sitter-zanscript.git
synced 2025-11-05 23:29:54 -06:00
41 lines
863 B
YAML
41 lines
863 B
YAML
name: Build and Release Tree-sitter Grammar
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
# Trigger on push to main branch or manually
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch: # Allows manual triggering of the workflow
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '20' # or the version you need
|
|
|
|
- name: Install dependencies
|
|
run: npm install
|
|
|
|
- name: Run build step
|
|
run: npm run build
|
|
|
|
- name: Create zip archive
|
|
run: |
|
|
zip -r grammar-with-artifacts.zip ./*
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
with:
|
|
files: grammar-with-artifacts.zip
|
|
make_latest: true
|