update README #27
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: Release | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
name: Build release artifacts | |
runs-on: ubuntu-20.04 | |
env: | |
REPO_NAME: ${{github.event.repository.name}} | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
ref: 'release' | |
# Don't do a sparse checkout because we need to | |
# create and push new commits: | |
fetch-depth: '0' | |
- name: Checkout master state | |
run: |- | |
git checkout origin/master -- . | |
rm .gitignore | |
mv release.gitignore .gitignore | |
- name: Set up tree-sitter CLI | |
uses: tree-sitter/setup-action/cli@v1 | |
with: | |
tree-sitter-ref: 'v0.22.6' | |
- name: Install parser dependencies | |
run: |- | |
JQ_SCRIPT='.dependencies | del(."node-addon-api", ."node-gyp-build") | length > 0' | |
if jq -e "$JQ_SCRIPT" package.json >/dev/null; then | |
npm i --omit dev --omit peer --omit optional | |
fi | |
- name: Generate parser | |
run: tree-sitter generate | |
- name: Run Unit-Tests | |
run: tree-sitter test | |
- name: Push to Release Branch | |
shell: bash | |
run: |- | |
git config user.name "GitHub Actions Bot" | |
git config user.email "<>" | |
git add --all | |
git commit -m "Release master at ${{ github.sha }}" | |
git push |