代码之家  ›  专栏  ›  技术社区  ›  mim

Electron builder版本试图发布到Github,并抱怨GH_令牌

  •  3
  • mim  · 技术社区  · 7 年前

    运行 release publish

    Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"


    背景 "publish": "never" 也会因无法找到模块而失败 electron-publisher-never

    Error: Cannot find module 'electron-publisher-never'


    这一切都发生在项目生成时,但生成脚本退出非零!

    我正在使用最新版本的electron builder。 我的生成脚本:

     "build": {
    "appId": "eu.armand.[****]",
    "copyright": "Copyright © 2017 mim_Armand",
    "productName": "[****]",
    "mac": {
      "publish": "never",
      "category": "public.app-category.[****]",
      "icon": "assets/icons/mac/icon.icns"
    }
    

    ,米

    3 回复  |  直到 7 年前
        1
  •  4
  •   Ajey    7 年前

    尝试使用构建

    "build": "electron-builder --publish never"
    

        2
  •  1
  •   Stefan Krüger s-light    6 年前


    如果脚本名称为 release always

    documentation 声明如下:

    CLI—发布选项值:

    如果npm脚本命名 释放
    添加到开发包中的脚本。json:
    "release": "build"
    如果你跑步 yarn release ,将起草一份版本(如果没有 已经存在)和 发布的工件

        3
  •  0
  •   riQQ dtb    4 年前

    我这样解决它,因为我不需要把它放在任何存储库中

    "build":{
        "appId": "XXX",
        "productName": "XXX",
        "directories":{
          "output": "build"
        },
        "win":{
         "target": "nsis",
         "publish" : []
        }
    }
    

    https://www.electron.build/configuration/publish