Skip to content

fix wf

fix wf #2

name: Publish bindings
on:
push:
branches:
- main
tags:
- 'bindings-*.*.*'
paths-ignore:
- 'tree-sitter-packages/**'
- 'tree-sitter/**'
- 'tree-sitter-json/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build --verbosity normal -c Release
- name: Pack
run: dotnet pack --no-build -c Release
- name: Publish the package to Nuget
run: dotnet nuget push src/TreeSitter.Bindings/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json