Build(deps): bump grammars/tree-sitter-d from 750dde9
to c067ff3
#251
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: | |
schedule: | |
- cron: 0 0 */7 * * | |
workflow_dispatch: | |
inputs: | |
tag_name: | |
description: 'Tag name for release' | |
required: false | |
default: nightly | |
push: | |
tags: ["v[0-9]+.[0-9]+.[0-9]+*"] | |
pull_request: | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
build: | |
runs-on: ${{ matrix.runs-on }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- runs-on: windows-latest | |
artefact: windows-x86_64 | |
- runs-on: ubuntu-latest | |
artefact: linux-x86_64 | |
- runs-on: macos-14 | |
artefact: macos-arm64 | |
- runs-on: macos-13 | |
artefact: macos-x86_64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install Ubuntu dependencies | |
if: runner.os == 'Linux' | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install curl wget clang pkg-config | |
sudo update-alternatives --set cc /usr/bin/clang | |
- name: Install tree-sitter-cli | |
run: | | |
cargo install tree-sitter-cli@^0.22 --locked | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Build grammars | |
if: always() | |
run: python ./make.py | |
- name: Create tarball | |
run: | | |
tar -C ./output -cvf ./${{ matrix.artefact }}.tar . | |
zstd ./${{ matrix.artefact }}.tar -o ./${{ matrix.artefact }}.tar.zst | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: ${{ matrix.artefact }} | |
path: | | |
./${{ matrix.artefact }}.tar.zst | |
retention-days: 3 | |
release: | |
runs-on: ubuntu-latest | |
needs: [build] | |
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' | |
steps: | |
# Must perform checkout first, since it deletes the target directory | |
# before running, and would therefore delete the downloaded artifacts | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
path: ./artefacts | |
merge-multiple: true | |
- name: Create tarball | |
run: | | |
tar -C ./queries -cvf ./artefacts/queries.tar . | |
zstd ./artefacts/queries.tar -o ./artefacts/queries.tar.zst | |
- if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
name: Re-Tag nightly | |
run: | | |
gh release delete nightly --yes || true | |
git push origin :nightly || true | |
- name: Create release (nightly) | |
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
run: | | |
gh release create \ | |
--prerelease \ | |
--draft \ | |
--title Nightly \ | |
--target $GITHUB_SHA \ | |
nightly \ | |
./artefacts/*.zst | |
- name: Create release (tag) | |
if: github.event_name == 'push' | |
run: | | |
gh release create \ | |
--draft \ | |
--title ${RELEASE_TAG#refs/tags/} \ | |
--target $GITHUB_SHA \ | |
${RELEASE_TAG#refs/tags/} \ | |
./artefacts/*.zst |