Skip to content

Merge pull request #42 from itmo-is-dev/feat/transitive-grpc-alias #56

Merge pull request #42 from itmo-is-dev/feat/transitive-grpc-alias

Merge pull request #42 from itmo-is-dev/feat/transitive-grpc-alias #56

Workflow file for this run

name: "publish packages"
on:
push:
branches: [ master ]
paths:
- 'src/**'
- '.github/workflows/publish.yml'
- '*.props'
workflow_dispatch:
jobs:
publish:
name: build and publish
runs-on: ubuntu-latest
environment: nuget.org
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 10.0.x
- name: exclude redundant projects and files
run: |
dotnet sln SourceKit.sln remove tests/SourceKit.Reflect.Tests/SourceKit.Reflect.Tests.csproj
rm -rf tests/SourceKit.Reflect.Tests
for proj in $(find samples | grep csproj$)
do
proj_dir=$(dirname "$proj")
dotnet sln SourceKit.sln remove "$proj"
rm -rf "$proj_dir"
done
- name: restore
run: dotnet restore SourceKit.sln
- name: build
run: |
dotnet build SourceKit.sln -c Release --no-restore /p:PatchVersion=${{ github.run_number }} /p:GeneratePackageOnBuild=false
dotnet build SourceKit.sln -c Release --no-restore /p:PatchVersion=${{ github.run_number }}
- name: publish to GitHub nuget repository
run: |
for file in bin/packages/*.nupkg
do
dotnet nuget push "${file#/}" --source "nuget.org" --api-key ${{ secrets.NUGET_API_KEY }}
done