Skip to content

nuget

nuget #10

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: nuget
on:
# Triggers the workflow on push or pull request events but only for the master branch
#push:
#branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Pack
run: dotnet pack OneShelf.Common/OneShelf.Common/OneShelf.Common.csproj --include-source -p:PackageVersion=1.1.${{ github.run_number }} -p:VersionSuffix=prerelease -p:EmbedUntrackedSources=True --configuration Release --output nuget -p:Authors="Pavel Zhur" -p:Description="DO NOT USE. It is a prerelease package of the HarmonyDB / OneShelf." -p:ContinuousIntegrationBuild=True
- name: Add nuget source
run: dotnet nuget add source --username pavel-zhur --password ${{ secrets.NUGET_API_KEY }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/pavel-zhur/index.json"
- name: Push
run: |
dir
cd nuget
dir
dotnet nuget push nuget/*.nupkg --source "github"
# - uses: "marvinpinto/action-automatic-releases@latest"
# with:
# repo_token: "${{ secrets.GITHUB_TOKEN }}"
# prerelease: true
# files: |
# LICENSE
# nuget/*.nupkg