Open VAllens opened 2 years ago
Got the same problem.
Got the same issue.. Nothing has changed in my action script
Same issue
https://github.com/NuGet/Home/issues/11601 This seems to be a problem with nuget. I don't know what version of nuget the dotnet nuget command uses. If it is up-to-date every time, this problem may be solved with the update of the version of nuget.
Same problem here. I have fixed it by removing references to this project and just pushing manually.
I previously had this in my workflow file:
- name: Publish NuGet
uses: brandedoutcast/publish-nuget@v2.5.5
with:
PROJECT_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj
PACKAGE_NAME: GrpcBrowser
VERSION_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj
VERSION_REGEX: \s*<Version>(.*)<\/Version>\s*
NUGET_KEY: ${{ secrets.NUGET_KEY }}
And I have replaced it with this:
- name: Package
run: dotnet pack -c Release -o . GrpcBrowser/GrpcBrowser.csproj
- name: Publish
run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
Same problem here. I have fixed it by removing references to this project and just pushing manually.
I previously had this in my workflow file:
- name: Publish NuGet uses: brandedoutcast/publish-nuget@v2.5.5 with: PROJECT_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj PACKAGE_NAME: GrpcBrowser VERSION_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj VERSION_REGEX: \s*<Version>(.*)<\/Version>\s* NUGET_KEY: ${{ secrets.NUGET_KEY }}
And I have replaced it with this:
- name: Package run: dotnet pack -c Release -o . GrpcBrowser/GrpcBrowser.csproj - name: Publish run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
Missing git tag
Same problem here. I have fixed it by removing references to this project and just pushing manually. I previously had this in my workflow file:
- name: Publish NuGet uses: brandedoutcast/publish-nuget@v2.5.5 with: PROJECT_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj PACKAGE_NAME: GrpcBrowser VERSION_FILE_PATH: src/GrpcBrowser/GrpcBrowser.csproj VERSION_REGEX: \s*<Version>(.*)<\/Version>\s* NUGET_KEY: ${{ secrets.NUGET_KEY }}
And I have replaced it with this:
- name: Package run: dotnet pack -c Release -o . GrpcBrowser/GrpcBrowser.csproj - name: Publish run: dotnet nuget push *.nupkg -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json
Missing
git tag
Also checking if never version then check in else ignore?
Also fixed it with doing it manual like @VAllens.. I used this (for .net):
`name: Release Master NuGet
on: push: branches: [ master ]
jobs: Release: name: Release to Nuget runs-on: ubuntu-latest timeout-minutes: 10
steps:
- name: Check out Repo
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Pack
run: dotnet pack EasyDbMigrator\\EasyDbMigrator.csproj -c Release
- name: Publish to GitHub packages
run: dotnet nuget push /home/runner/work/EasyDbMigrator/EasyDbMigrator/EasyDbMigrator/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate`
还修复了它,像@VAllens一样手动完成。我用了这个(对于.net):
'名称: 发布主 NuGet
on: 推: 分支: [ 主 ]
作业: 发布: 名称: 发布到 Nuget 运行:ubuntu 最新超时分钟数: 10
steps: - name: Check out Repo uses: actions/checkout@v2 - name: Setup dotnet uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.x - name: Pack run: dotnet pack EasyDbMigrator\\EasyDbMigrator.csproj -c Release - name: Publish to GitHub packages run: dotnet nuget push /home/runner/work/EasyDbMigrator/EasyDbMigrator/EasyDbMigrator/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate`
Good job. Me too.
name: NuGet Publish
on:
pull_request:
types: [ closed ]
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore Obfuscation.Tasks project dependencies
run: dotnet restore src/Obfuscation.Tasks/Obfuscation.Tasks.csproj
- name: Build Obfuscation.Tasks project
run: dotnet build src/Obfuscation.Tasks/Obfuscation.Tasks.csproj --no-restore --configuration Release
- name: Pack Obfuscation.Tasks project
run: dotnet pack src/Obfuscation.Tasks/Obfuscation.Tasks.csproj --no-build --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg -o .
- name: Publish package to NuGet
run: dotnet nuget push *.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source "https://api.nuget.org/v3/index.json" --skip-duplicate
- name: publish package to GitHub
run: dotnet nuget push *.nupkg --api-key ${{secrets.PUBLISH_TO_GITHUB_TOKEN}} --source "https://nuget.pkg.github.com/VAllens/index.json" --skip-duplicate
Same issue here, however, the packaged was published successfully
Same error message with the package being published successfully.
I recently changed from .net 5 to 6:
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
to
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
Maybe that triggered the error message.
For those having the same problem, It seems to be a dotnet 6 topic.
The problem is with the option -n
(no symbols).
In previous versions of dotnet , using this parameter requires a value (true or false, 1 or 0). Since dotnet 6.0.102 -> 6.0.200 the value is not required anymore.
This is even written in the doc or on the help output for
dotnet nuget push --help
-n|--no-symbols If a symbols package exists, it will not be pushed to a symbols server.
You can use version 3.0.3 of this fork https://github.com/alirezanet/publish-nuget which among others includes a fix for this issue
You can use version 3.0.1 of this fork https://github.com/alirezanet/publish-nuget which among others includes a fix for this issue
There are a mountain of forks for this action. It would be really great if we identified and settled on one as the new "source of truth" for publishing to NuGet from GitHub Actions, since this repository seems to be abandoned.
You can use version 3.0.1 of this fork https://github.com/alirezanet/publish-nuget which among others includes a fix for this issue
There are a mountain of forks for this action. It would be really great if we identified and settled on one as the new "source of truth" for publishing to NuGet from GitHub Actions, since this repository seems to be abandoned.
I still don't see why use a Github action to push to nuget while you can achieve that by writing some lines? I abandoned the usage of this action and I'm using a native dotnet commands to push to nuget
您可以使用此分叉 https://github.com/alirezanet/publish-nuget 版本3.0.1,其中包括针对此问题的修复程序
这个动作有一堆叉子。如果我们确定并确定一个作为从 GitHub Actions 发布到 NuGet 的新"事实源",那将非常棒,因为此存储库似乎已被放弃。
我仍然不明白为什么使用Github操作来推送到nuget,而您可以通过编写一些行来实现这一点?我放弃了使用此操作,并且我正在使用本机dotnet命令推送到nuget
I'm now also using dotnet command to push to nuget.
The plugin, which has the advantage of Automatically git tag
You can use version 3.0.1 of this fork https://github.com/alirezanet/publish-nuget which among others includes a fix for this issue
There are a mountain of forks for this action. It would be really great if we identified and settled on one as the new "source of truth" for publishing to NuGet from GitHub Actions, since this repository seems to be abandoned.
I still don't see why use a Github action to push to nuget while you can achieve that by writing some lines? I abandoned the usage of this action and I'm using a native dotnet commands to push to nuget
The advantage is that it checks whether the version in .csproj
was modified and only runs build, pack, publish and then git tag
if necessary.
This is still an issue.
This is still an issue.
There is a good fork of it. Simply replace this part in your workflow with alirezanet/publish-nuget@v3.0.4 and your are done
Yeah I'll either do that or just drop it and use dotnet nuget push. Thanks.
If other functions of this workflow like tagging are not needed, using dotnet nuget push
directly is of course a viable and probably a better option :)
Problem solved for me. Your dotnet-version of the job is must be same to dotnet version of your project. dotnet version of my project is 5.0 but dotnet version in my job is 6.0.x. I changed version 6.0.x to 5.0.x in the job.
The push was successful, but I received an exception:
My
publish.yml
:console log:
here: https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true