Closed favna closed 4 years ago
look in #21.
@Favna I think you need to migrate to the .snupkg
extension for now. Besides .snupkg
is newer and shorter on file name. While same format as the .nupkg
being a zip file renamed, it might be the thing that makes it work.
If this action can be configured to do so then by all means sure (I don't see an option for it...). Take note that this sentence from my original message is extremely important:
Note that the (single) .cs file that it publishes is autogenerated by the github action and never tracked in Git
Or in other words, I control basically nothing of the build / publish process except the csproj file. Everything else is either autogenerated by the continuous delivery pipeline, or generated by this action (also in said continuous pipeline)
Right now this is my implementation of this action: https://github.com/favware/graphql-pokemon/blob/5e1126005808024fc26cec5f6b470cd52ee6ebd3/.github/workflows/continuous-delivery.yml#L326-L333 And this is the csproj I target: https://github.com/favware/graphql-pokemon/blob/master/generated/dotnet/Favware.Graphqlpokemon.csproj
Disclaimer: I've never really done any .NET development, I'm publishing this class for other end-users to implement my GraphQL API in their projects. I literally have zero to nill knowledge of .NET's inner workings.
I see, I know .NET, but have zero to nil knowledge on making github actions from scratch either sadly.
oh and sorry, it seems I was wrong it still is messing up on it all. https://github.com/AraHaan/GitInformation/runs/647166313
@Favna @AraHaan Sorry for the trouble 🙏
I was in doubt when pushing it & I see my fears have come true. I'm busy with my work life right now so I can only properly fix this on the weekend meanwhile a quick workaround would be to add INCLUDE_SYMBOLS: false
or replace publish-nuget@v2
with publish-nuget@v2.3.0
in your action file
I'll post an update here once it's fixed
Thanks for the update Rohith!
It seems because of the fact that the marketplace example using the v2 one and as such people that copy paste from that results in this issue here.
hmm I tried what they said and it still produces issues: https://github.com/AraHaan/GitInformation/runs/651127299
@arahaan you're still using v2.4.0
instead of downgrading to v2.3.0
or disabling INCLUDE_SYMBOLS
as suggested, it doesn't work as basically nothing's changed in your workflow
2.5.0
fixes this issue by partially reverting the changes introduced with 2.4.0
Seems like the dotnet nuget push
doesn't work as advertised when including symbols due to several issues with NuGet like nuget/home#9543 NuGet/Home#8589 nuget/home#5446 nuget/home#5442
Symbols are now opt-in (to be consistent with other minor releases & this is good for GPR support), either a future MAJOR release or nuget/home#7892 might enable it
Inputs for a specifying a different symbol source from the package source is removed (honestly I believe no one asked for it & I see it was a mistake when it's not yet properly supported by NuGet because of the above issues
TYVM @rohith!
Thanks for reporting this @Favna I almost forgot to address your question about pushing to GitHub although I see you're using some other action to do it but leaving it here just in case
As of now this action uses a specific endpoint to detect version changes in the project which is unavailable with GitHub Package Registry so GitHub is not yet supported but I'll have to find an alternative to fix that & I'll make sure to post an update here once the action supports GPR
@rohith I'm publishing various things in the workflow
Hi. I'm confused about this issue. Does INCLUDE_SYMBOLS: true
now work, or not?
I can't get it to work. I get ##[error]😭 error: Response status code does not indicate success: 400 (The package does not contain any symbol (.pdb) files.).
My deploy works fine if I set INCLUDE_SYMBOLS: false
.
If this functionality is broken the docs should be updated to reflect that.
If it's not supported, can someone give me a simple recipe for updating the symbols on nuget separately?
name: publish Terminal.Gui to nuget
on:
push:
branches:
- master # Default release branch
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.200
# Publish
- name: publish on version change
id: publish_nuget
uses: rohith/publish-nuget@v2
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: Terminal.Gui/Terminal.Gui.csproj
# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: Terminal.Gui
# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
VERSION_FILE_PATH: Directory.Build.props
# Regex pattern to extract version info in a capturing group
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0
# Flag to toggle git tagging, enabled by default
# TAG_COMMIT: true
# Format of the git tag, [*] gets replaced with actual version
# TAG_FORMAT: v*
# API key to authenticate with NuGet server
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# NuGet server uri hosting the packages, defaults to https://api.nuget.org
# NUGET_SOURCE: https://api.nuget.org
# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
INCLUDE_SYMBOLS: true
Bump. Any thoughts on INCLUDE_SYMBOLS
?
I was unable to get INCLUDE_SYMBOLS
working. I've abandoned snupkg
entirely and am currently using this solution which throws everything into the DLL and "just works".
First of all many thanks for this action. It has saved me so much pain!!
I see that since a more recent publish you now default to also pushing symbols, this however made my CI exit out with exit code 1 as it was unable to find a file named
*.symbols.nupkg
. For now I disabled it by passingINCLUDE_SYMBOLS: false
to the config but I wanted to bring it up anyway. Below is the full raw log of the action and this is where it ran and failed: https://github.com/favware/graphql-pokemon/runs/639296241?check_suite_focus=trueThis is the CSPROJ file that it uses for publishing: https://github.com/favware/graphql-pokemon/blob/master/generated/dotnet/Favware.Graphqlpokemon.csproj Note that the (single)
.cs
file that it publishes is autogenerated by the github action and never tracked in Git, therefore it is not in the repository. That said, here is a version of it: https://hasteb.in/comoroni.csFull raw action log
``` 2020-05-02T19:34:29.7073157Z ##[group]Run actions/download-artifact@v2-preview 2020-05-02T19:34:29.7073662Z with: 2020-05-02T19:34:29.7074101Z name: changelog_bundle 2020-05-02T19:34:29.7074548Z env: 2020-05-02T19:34:29.7074989Z DOTNET_CLI_TELEMETRY_OPTOUT: true 2020-05-02T19:34:29.7075446Z ##[endgroup] 2020-05-02T19:34:29.8509681Z Directory structure has been setup for the artifact 2020-05-02T19:34:29.8517789Z Total number of files that will be downloaded: 1 2020-05-02T19:34:29.9054512Z Artifact changelog_bundle was downloaded to /home/runner/work/graphql-pokemon/graphql-pokemon 2020-05-02T19:34:29.9055609Z Artifact download has finished successfully 2020-05-02T19:34:29.9207304Z ##[group]Run actions/setup-dotnet@v1 2020-05-02T19:34:29.9207792Z with: 2020-05-02T19:34:29.9208251Z dotnet-version: 3.1.201 2020-05-02T19:34:29.9208714Z env: 2020-05-02T19:34:29.9209176Z DOTNET_CLI_TELEMETRY_OPTOUT: true 2020-05-02T19:34:29.9209713Z ##[endgroup] 2020-05-02T19:34:30.0781357Z [command]/home/runner/work/_actions/actions/setup-dotnet/v1/externals/get-os-distro.sh 2020-05-02T19:34:30.0955884Z Primary:linux-x64 2020-05-02T19:34:30.1014124Z Legacy:ubuntu.18.04 2020-05-02T19:34:30.1015188Z Checking tool cache 2020-05-02T19:34:30.1018819Z Getting a download url 3.1.201 2020-05-02T19:34:31.8666692Z Extracting Package /home/runner/work/_temp/770d3a80-8f9c-4ee1-87c0-4a8962a1d55d 2020-05-02T19:34:31.8683402Z [command]/bin/tar xz -C /home/runner/work/_temp/fd2b2875-3f51-4cd6-8efc-589878f82a5b -f /home/runner/work/_temp/770d3a80-8f9c-4ee1-87c0-4a8962a1d55d 2020-05-02T19:34:34.9351463Z Caching tool 2020-05-02T19:34:37.3037328Z Successfully installed 3.1.201 2020-05-02T19:34:37.3310158Z ##[group]Run rohith/publish-nuget@v2 2020-05-02T19:34:37.3310635Z with: 2020-05-02T19:34:37.3311113Z PROJECT_FILE_PATH: generated/dotnet/Favware.Graphqlpokemon.csproj 2020-05-02T19:34:37.3311622Z PACKAGE_NAME: Favware.Graphqlpokemon 2020-05-02T19:34:37.3312098Z TAG_COMMIT: false 2020-05-02T19:34:37.3312991Z NUGET_KEY: *** 2020-05-02T19:34:37.3313451Z VERSION_REGEX:As an aside, I assume the
NUGET_SOURCE
option is so we can use this action to publish to GitHub. If this is correct I would love it if you could include some instructions in the README for setting this up both in the workflow file as well as any config (if any at all) required to set in the csproj file. Coming from a NodeJS background and only publishing C# for end-users that's all way above my knowledge level right now.