Skip to content
This repository has been archived by the owner on Jun 13, 2024. It is now read-only.

chore(deps): upgrade dependencies (#153) #8

chore(deps): upgrade dependencies (#153)

chore(deps): upgrade dependencies (#153) #8

name: CSharp Publish
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: write
id-token: write
defaults:
run:
working-directory: packages/csharp
on:
workflow_dispatch:
push:
branches: [main]
paths:
- .github/workflows/csharp-publish.yml
- 'packages/csharp/Directory.Build.props'
jobs:
package-nuget:
runs-on: ubuntu-latest
environment:
name: Nuget
name: csharp-publish-release
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0
7.0
8.0
env:
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: nuget/setup-nuget@v1
with:
nuget-api-key: ${{ secrets.GITHUB_TOKEN }}
- name: build nupkg
run: |
dotnet build -c Release
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings
path: packages/csharp/**/*.nupkg
if-no-files-found: error
- name: publish nuget pkg
run: |
find -type f | grep nupkg$ | grep -v 'symbols\.nupkg$' | while read line; do
echo "Pulish: $line"
nuget push $line \
-Source https://api.nuget.org/v3/index.json \
-ApiKey ${{ secrets.NUGET_TOKEN }} \
-SkipDuplicate
done