29 lines
804 B
YAML
29 lines
804 B
YAML
name: "Nuget: publish"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
paths:
|
|
- "Moonlight.PluginTemplate.csproj"
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: linux_amd64
|
|
|
|
steps:
|
|
# Checkout code
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
# Build project
|
|
- name: Build project
|
|
run: dotnet build Moonlight.PluginTemplate.csproj --configuration Release
|
|
|
|
# Publish project
|
|
- name: Publish NuGet package
|
|
run: dotnet pack Moonlight.PluginTemplate.csproj --configuration Release --output ./artifacts
|
|
|
|
- name: Push nuget package
|
|
run: dotnet nuget push ./artifacts/*.nupkg --skip-duplicate --source https://git.battlestati.one/api/packages/Moonlight-Panel/nuget/index.json --api-key ${{ secrets.ACCESS_TOKEN }} |