samuelmeuli / action-electron-builder

:electron: GitHub Action for building and releasing Electron apps
MIT License
658 stars 201 forks source link

Release fails with 403 from GitHub API #40

Closed janraasch closed 4 years ago

janraasch commented 4 years ago

Hi there, I am trying to use this fine action on a private repo.

Building works fine, however the release / publishing to GitHub fails with a 403. Here is the output:

2020-07-29T15:14:03.5631080Z Running the build script…
2020-07-29T15:14:03.8488620Z 
2020-07-29T15:14:03.8490070Z Building and releasing the Electron app…
2020-07-29T15:14:04.1967020Z   • electron-builder  version=22.8.0 os=19.6.0
2020-07-29T15:14:04.3610210Z   • loaded configuration  file=package.json ("build" field)
2020-07-29T15:14:04.7975230Z   • packaging       platform=darwin arch=x64 electron=9.1.1 appOutDir=dist/mac
2020-07-29T15:14:05.0681650Z   • downloading     url=https://github.com/electron/electron/releases/download/v9.1.1/electron-v9.1.1-darwin-x64.zip size=72 MB parts=8
2020-07-29T15:14:05.5645240Z   • downloaded      url=https://github.com/electron/electron/releases/download/v9.1.1/electron-v9.1.1-darwin-x64.zip duration=753ms
2020-07-29T15:14:11.6323690Z   • default Electron icon is used  reason=application icon is not set
2020-07-29T15:14:11.7897950Z   • skipped macOS application code signing  reason=cannot find valid "Developer ID Application" identity or custom non-Apple code signing certificate, see https://electron.build/code-signing allIdentities=
2020-07-29T15:14:11.7898430Z                                                    0 identities found
2020-07-29T15:14:11.7898720Z                                               
2020-07-29T15:14:11.7899000Z                                                 Valid identities only
2020-07-29T15:14:11.7899260Z                                                    0 valid identities found
2020-07-29T15:14:11.7921890Z   • building        target=macOS zip arch=x64 file=dist/Prototype-0.0.1-mac.zip
2020-07-29T15:14:11.7925150Z   • building        target=DMG arch=x64 file=dist/Prototype-0.0.1.dmg
2020-07-29T15:14:54.9080440Z   • building embedded block map  file=dist/Prototype-0.0.1-mac.zip
2020-07-29T15:14:55.8183250Z   • publishing      publisher=Github (owner: electron, project: electron-quick-start, version: 0.0.1)
2020-07-29T15:14:55.8467140Z   • uploading       file=Prototype-0.0.1-mac.zip provider=GitHub
2020-07-29T15:14:56.5540610Z   • creating GitHub release  reason=release doesn't exist tag=v0.0.1 version=0.0.1
2020-07-29T15:15:42.0659830Z   • building block map  blockMapFile=dist/Prototype-0.0.1.dmg.blockmap
2020-07-29T15:15:42.9692560Z   • uploading       file=Prototype-0.0.1.dmg.blockmap provider=GitHub
2020-07-29T15:15:42.9693340Z   • uploading       file=Prototype-0.0.1.dmg provider=GitHub
2020-07-29T15:15:43.0456390Z   ⨯ Cannot cleanup: 
2020-07-29T15:15:43.0456690Z 
2020-07-29T15:15:43.0457650Z Error #1 --------------------------------------------------------------------------------
2020-07-29T15:15:43.0458000Z HttpError: 403 Forbidden
2020-07-29T15:15:43.0458310Z {
2020-07-29T15:15:43.0458500Z   "message": "Resource not accessible by integration",
2020-07-29T15:15:43.0459210Z   "documentation_url": "https://developer.github.com/v3/repos/releases/#create-a-release"
2020-07-29T15:15:43.0459510Z }
2020-07-29T15:15:43.0459750Z Headers: {
2020-07-29T15:15:43.0459940Z   "server": "GitHub.com",
2020-07-29T15:15:43.0460140Z   "date": "Wed, 29 Jul 2020 15:14:56 GMT",
2020-07-29T15:15:43.0460780Z   "content-type": "application/json; charset=utf-8",
2020-07-29T15:15:43.0461310Z   "content-length": "139",
2020-07-29T15:15:43.0462370Z   "connection": "close",
2020-07-29T15:15:43.0462570Z   "status": "403 Forbidden",
2020-07-29T15:15:43.0463140Z   "x-ratelimit-limit": "1000",
2020-07-29T15:15:43.0463700Z   "x-ratelimit-remaining": "979",
2020-07-29T15:15:43.0464210Z   "x-ratelimit-reset": "1596037747",
2020-07-29T15:15:43.0464750Z   "x-github-media-type": "github.v3; format=json",
2020-07-29T15:15:43.0465620Z   "access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, Deprecation, Sunset",
2020-07-29T15:15:43.0466180Z   "access-control-allow-origin": "*",
2020-07-29T15:15:43.0466760Z   "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
2020-07-29T15:15:43.0467250Z   "x-frame-options": "deny",
2020-07-29T15:15:43.0467750Z   "x-content-type-options": "nosniff",
2020-07-29T15:15:43.0468270Z   "x-xss-protection": "1; mode=block",
2020-07-29T15:15:43.0468890Z   "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
2020-07-29T15:15:43.0469380Z   "content-security-policy": "default-src 'none'",
2020-07-29T15:15:43.0469930Z   "vary": "Accept-Encoding, Accept, X-Requested-With",
2020-07-29T15:15:43.0470490Z   "x-github-request-id": "C0D5:5C98:634319:E50146:5F21926F"
2020-07-29T15:15:43.0470750Z }
2020-07-29T15:15:43.0471510Z     at createHttpError (/Users/runner/work/electron-quick-start/electron-quick-start/node_modules/builder-util-runtime/src/httpExecutor.ts:30:10)
2020-07-29T15:15:43.0472310Z     at IncomingMessage.<anonymous> (/Users/runner/work/electron-quick-start/electron-quick-start/node_modules/builder-util-runtime/src/httpExecutor.ts:166:18)
2020-07-29T15:15:43.0472570Z     at IncomingMessage.emit (events.js:327:22)
2020-07-29T15:15:43.0472840Z     at endReadableNT (_stream_readable.js:1221:12)
2020-07-29T15:15:43.0473090Z     at processTicksAndRejections (internal/process/task_queues.js:84:21)
2020-07-29T15:15:43.0473220Z 
2020-07-29T15:15:43.0473940Z Error #2 --------------------------------------------------------------------------------
2020-07-29T15:15:43.0474240Z HttpError: 403 Forbidden
........

This is my .yml:

name: Build/release

on: push

jobs:
  release:
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        os: [macos-latest, windows-latest]

    steps:
      - name: Check out Git repository
        uses: actions/checkout@v2
        with:
          submodules: true

      - name: Install Node.js, NPM and Yarn
        uses: actions/setup-node@v1
        with:
          node-version: 12

      - name: Build/release Electron app
        uses: samuelmeuli/action-electron-builder@v1
        with:
          # GitHub token, automatically provided to the action
          # (No need to define this secret in the repo settings)
          github_token: ${{ secrets.GITHUB_TOKEN }}

          # If the commit is tagged with a version (e.g. "v1.0.0"),
          # release the app after building
          release: ${{ startsWith(github.ref, 'refs/tags/v') }}

Any ideas? Am I missing something?

Thank you, Jan 👋


PS: I am Admin on the repo.

janraasch commented 4 years ago

Man, guess what... The repository-key on my package.json was wrong... It still pointed to electron-quickstart...

Oh well...

Never mind 😅

Sorry for the noise.

andreaswilli commented 2 years ago

You just saved me a few hours and a massive headache. Thanks for posting 🙌🏼