Closed csharpfritz closed 3 years ago
Modify the following:
.github/workflows/publish-nuget.yml
Add a secret in the repo settings called NUGET_API_KEY
and copy in your new API key (Publishing Packages)
Update the PROJECT_FILE_PATH
Specify which branch.
name: Publish to NuGet
on:
push:
branches:
- main # Your default release branch
paths:
- 'parsers/dotnet/**'
jobs:
publish:
name: Publish to NuGet
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.100
- name: Publish
uses: rohith/publish-nuget@v2
#uses: brandedoutcast/publish-nuget@v2.5.2
with:
PROJECT_FILE_PATH: parsers/dotnet/Taml.NET/Taml.NET.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
Great stuff @AlexHedley ! Would you like to put that in a PR and I'll get the NuGet keys configured?
Let's have it only deploy from the Main
branch
Hmm, I think we need some of the fields filled out in the csproj for the NuGet package first.
@AlexHedley idea: let's configure the action to only run on the publish of a release. That way we can grab the release version number and use it for the NuGet package version
Versioning is always a pain with the automation.
Might be good to get some info into the csproj.
Do we have a logo yet too?
I've seen a way to push a GH release to Nuget, I'll get a workflow PR setup.
We do not have a logo yet... the "tab arrows" glyph has been suggested, and I could see it as a temporary one https://www.onlinewebfonts.com/icon/1632
I'd want something more stylized... but that's a starting point
Jeff
On Tue, Sep 22, 2020 at 2:58 PM Alex Hedley notifications@github.com wrote:
Versioning is always a pain with the automation.
Might be good to get some info into the csproj.
Do we have a logo yet too?
I've seen a way to push a GH release to Nuget, I'll get a workflow PR setup.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/csharpfritz/TAML/issues/38#issuecomment-696916604, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAATF4L7GV24SVMNKJSHMGDSHDXVDANCNFSM4RQOJ2WQ .
If you did want to publish to GHP:
skolima/dotnet-publish-nuget.yml
https://gist.github.com/skolima/7a2b458552af834474a1afce2e06ba10
All set, but needs version configured inside the csproj
Configure a GitHub action to deploy to NuGet