Estou desenvolvendo uma aplicação para um projeto usando electron e node.js, o projeto é para ser compilado automaticamente ao fazer um push origin no github tendo um draft da release, porém ao buildar o projeto no github ele não gera os arquivos .exe
Segue abaixo imagem do github:
não era para estar aparecendo "skipped publishing"
este é meu package.json:
{
"name": "pixelmon-online",
"preductname": "Pixelmon Online",
"version": "1.1.1",
"description": "Launcher da Pixelmon Online",
"main": "src/app.js",
"author": "Luuxis",
"url": "http://servidorpixelmonline.com",
"engines": {
"node": "^16.x.x"
},
"scripts": {
"start": "cross-env-shell NODE_ENV=dev electron .",
"build": "node build.js",
"dev": "nodemon --exec npm start"
},
"license": "CC0",
"nodemonConfig": {
"ext": "js,html,css"
},
"dependencies": {
"electron-updater": "^5.0.1",
"minecraft-java-core": "^2.5.1",
"node-fetch": "^2.6.7"
},
"devDependencies": {
"cross-env": "^7.0.3",
"electron": "^20.0.0",
"electron-builder": "^23.0.3",
"nodemon": "^2.0.16"
},
"repository": {
"type": "git",
"url": "git+https://github.com/NicolasBrunaldi/Pixelmonline-Launcher.git"
}
}
Arquivo build.yaml
name: Launcher Build
on:
push:
branches: [ master ]
jobs:
release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 16
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install Dependencies
run: npm ci
shell: bash
- name: Build
env:
GH_TOKEN: ${{ secrets.github_token }}
run: npm run build
shell: bash
Arquivo build.js:
const builder = require('electron-builder')
const { preductname } = require('./package.json')
builder.build({
config: {
generateUpdatesFilesForAllChannels: true,
appId: preductname,
productName: preductname,
artifactName: "${productName}-${os}-${arch}.${ext}",
files: ["src/**/*", "package.json", "LICENSE.md"],
directories: { "output": "dist" },
compression: 'maximum',
asar: true,
win: {
icon: "./src/assets/images/icon.ico",
target: [{
target: "nsis",
arch: ["x64"]
}],
},
nsis: {
oneClick: true,
allowToChangeInstallationDirectory: false,
createDesktopShortcut: true,
runAfterFinish: true
},
mac: {
icon: "./src/assets/images/icon.icns",
category: "public.app-category.games",
target: [{
target: "dmg",
arch: ["x64", "arm64"]
}]
},
linux: {
icon: "./src/assets/images/icon.png",
target: [{
target: "AppImage",
arch: ["x64"]
}, {
target: "tar.gz",
arch: ["x64"]
}]
}
}
}).then(() => {
console.log('le build est terminé')
}).catch(err => {
console.error('Error during build!', err)
})