[ADD] Workflow pack to nuget package and publish to Gitea packages
This commit is contained in:
parent
ce4139d100
commit
c3f58eb172
1 changed files with 16 additions and 2 deletions
|
|
@ -25,6 +25,20 @@ jobs:
|
||||||
|
|
||||||
- name: Build library
|
- name: Build library
|
||||||
run: dotnet build --configuration Release
|
run: dotnet build --configuration Release
|
||||||
|
|
||||||
|
- name: Pack
|
||||||
|
run: dotnet pack MyLibrary.csproj --configuration Release -o ./artifacts
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Publish to Gitea NuGet
|
||||||
run: dotnet test --configuration Release --no-build
|
run: |
|
||||||
|
dotnet nuget add source \
|
||||||
|
--username $GITEA_USER \
|
||||||
|
--password $GITEA_TOKEN \
|
||||||
|
--store-password-in-clear-text \
|
||||||
|
--name gitea \
|
||||||
|
https://gitea.netzbyte.com/api/packages/$GITEA_USER/nuget/index.json
|
||||||
|
|
||||||
|
dotnet nuget push ./artifacts/*.nupkg --source gitea --skip-duplicate
|
||||||
|
env:
|
||||||
|
GITEA_USER: max
|
||||||
|
GITEA_TOKEN: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue