Skip to content

修复鉴权

修复鉴权 #12

Workflow file for this run

name: publish to nuget
on:
push:
branches:
- main # Default release branch, may also be named 'master' or 'develop'
jobs:
publish:
name: Build & Publish to Nuget
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6
7
8
- uses: kzrnm/get-net-sdk-project-versions-action@v1
id: get-version
with:
proj-path: QQChannelFramework.csproj
- name: Generate build number
id: buildnumber
uses: onyxmueller/build-tag-number@v1
with:
token: ${{secrets.GITHUB_TOKEN}}
- name: Build
run: dotnet build QQChannelFramework.csproj --configuration Release -p:PackageVersion="${{steps.get-version.outputs.package-version}}.${{ steps.buildnumber.outputs.build_number }}"
- name: Publish
run: dotnet nuget push bin/Release/**/*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate