Skip to content

Change runtime dependency #36

Change runtime dependency

Change runtime dependency #36

Workflow file for this run

name: Publish
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@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Login to github registry
run: dotnet nuget add source --username treesitter-bindings --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/davidelettieri/index.json"
- 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 GPR
run: dotnet nuget push src/TreeSitter.Bindings/bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
- 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