Skip to content
This repository was archived by the owner on Oct 26, 2022. It is now read-only.

[BUG] Error: 😭 error: File does not exist (1). #76

@VAllens

Description

@VAllens

The push was successful, but I received an exception:

Error: 😭 error: File does not exist (1).

My publish.yml:

name: NuGet Publish

on:
  pull_request:
    branches: [ main ]

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET
      uses: actions/setup-dotnet@v1
      with:
        dotnet-version: 6.0.x
    - name: Restore Obfuscation.Fody project dependencies
      run: dotnet restore src/Obfuscation.Fody/Obfuscation.Fody.csproj
    - name: Restore Obfuscation.Fody.NuGet project dependencies
      run: dotnet restore src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj
    - name: Build Obfuscation.Fody project
      run: dotnet build src/Obfuscation.Fody/Obfuscation.Fody.csproj --no-restore --configuration Release
    - name: Build Obfuscation.Fody.NuGet project
      run: dotnet build src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-restore --configuration Release
    - name: Pack Obfuscation.Fody.NuGet project
      run: dotnet pack src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj --no-build --configuration Release
    - name: publish nuget package on version change
      uses: rohith/publish-nuget@v2
      with:
        PROJECT_FILE_PATH: src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj
        PACKAGE_NAME: Obfuscation.Fody
        VERSION_FILE_PATH: Directory.Build.props
        NUGET_KEY: ${{secrets.NUGET_API_KEY}}

console log:

Project Filepath: src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj
Version Filepath: Directory.Build.props
Version Regex: /^\s*<Version>(.*)<\/Version>\s*$/m
Version: 1.0.0
Package Name: Obfuscation.Fody
✨ found new version (1.0.0) of Obfuscation.Fody
NuGet Source: https://api.nuget.org
executing: [dotnet build -c Release src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj]
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Determining projects to restore...
  All projects are up-to-date for restore.
  Obfuscation.Fody.NuGet -> /home/runner/work/Obfuscation.Fody/Obfuscation.Fody/src/Obfuscation.Fody.NuGet/bin/Release/Obfuscation.FodyHelper.dll

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:00.94
executing: [dotnet pack  --no-build -c Release src/Obfuscation.Fody.NuGet/Obfuscation.Fody.NuGet.csproj -o .]
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET
Copyright (C) Microsoft Corporation. All rights reserved.

  Successfully created package '/home/runner/work/Obfuscation.Fody/Obfuscation.Fody/Obfuscation.Fody.1.0.0.nupkg'.
  OutputPackageDir: ../../packages
  NuPkgFiles: /home/runner/work/Obfuscation.Fody/Obfuscation.Fody/src/Obfuscation.Fody.NuGet/bin/Release/Obfuscation.Fody.1.0.0.nupkg
  Copy /home/runner/work/Obfuscation.Fody/Obfuscation.Fody/src/Obfuscation.Fody.NuGet/bin/Release/Obfuscation.Fody.1.0.0.nupkg to ../../packages successfully
Generated Package(s): Obfuscation.Fody.1.0.0.nupkg
executing: [dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k *** --skip-duplicate -n 1]
Pushing Obfuscation.Fody.1.0.0.nupkg to 'https://www.nuget.org/api/v2/package'...
  PUT https://www.nuget.org/api/v2/package/
  Created https://www.nuget.org/api/v2/package/ 704ms
Your package was pushed.
error: File does not exist (1).


Usage: dotnet nuget push [arguments] [options]

Arguments:
  [root]  Specify the path to the package and your API key to push the package to the server.

Options:
  -h|--help                      Show help information
  --force-english-output         Forces the application to run using an invariant, English-based culture.
  -s|--source <source>           Package source (URL, UNC/folder path or package source name) to use. Defaults to DefaultPushSource if specified in NuGet.Config.
  -ss|--symbol-source <source>   Symbol server URL to use.
  -t|--timeout <timeout>         Timeout for pushing to a server in seconds. Defaults to 300 seconds (5 minutes).
  -k|--api-key <apiKey>          The API key for the server.
  -sk|--symbol-api-key <apiKey>  The API key for the symbol server.
  -d|--disable-buffering         Disable buffering when pushing to an HTTP(S) server to decrease memory usage.
  -n|--no-symbols                If a symbols package exists, it will not be pushed to a symbols server.
  --no-service-endpoint          Does not append "api/v2/package" to the source URL.
  --interactive                  Allow the command to block and require manual action for operations like authentication.
  --skip-duplicate               If a package and version already exists, skip it and continue with the next package in the push, if any.

Error: 😭 error: File does not exist (1).
/home/runner/work/_actions/rohith/publish-nuget/v2/index.js:23
        throw new Error(msg)
        ^

Error: error: File does not exist (1).
    at Action._printErrorAndExit (/home/runner/work/_actions/rohith/publish-nuget/v2/index.js:23:[15](https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true#step:9:15))
    at Action._pushPackage (/home/runner/work/_actions/rohith/publish-nuget/v2/index.js:73:18)
    at ClientRequest.<anonymous> (/home/runner/work/_actions/rohith/publish-nuget/v2/index.js:101:22)
    at Object.onceWrapper (events.js:300:26)
    at ClientRequest.emit (events.js:210:5)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:583:27)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:115:[17](https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true#step:9:17))
    at TLSSocket.socketOnData (_http_client.js:456:22)
    at TLSSocket.emit (events.js:[21](https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true#step:9:21)0:5)
    at addChunk (_stream_readable.js:[30](https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true#step:9:30)9:12)

here: https://github.com/VAllens/Obfuscation.Fody/runs/5226354030?check_suite_focus=true

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions