action-electron-builder
action-electron-builder copied to clipboard
Action not publishing release
Using the README action:
name: Build/release
on:
push:
branches:
- master
jobs:
release:
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
matrix:
os: [macos-10.15, ubuntu-18.04, windows-latest]
steps:
- name: Check out Git repository
uses: actions/checkout@v1
- name: Install Node.js, NPM and Yarn
uses: actions/[email protected]
with:
node-version: '>=16.8.0'
- 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') }}
and tagging and pushing, no release is created. Log shows:
• skipped publishing file=latest-mac.yml reason=release doesn't exist and not created because "publish" is not "always" and build is not on tag tag=v2.5.4 version=2.5.4
I'm facing the same issue, does anyone how to solve this problem?
We were using a native extension (serialport
) which caused the build to fail.
We replaced the requiring package and voilá, it built.
Having this issue too. @ramonbroox, what package did you replace
Having this issue too. @ramonbroox, what package did you replace
One osc-something npm package. Check your package-lock.json for the serialport
dependency. Also, any native package that requires compilation might be involved.
i cannot understand what you replaced
Using this fixed this issue for me:
name: Build/Release Electron app
uses: samuelmeuli/action-electron-builder@v1
with:
release: ${{ startsWith(github.ref, 'refs/tags/v') }}
args: "-c.snap.publish=github"
github_token: ${{ secrets.github_token }}
I was having the same issue but fixed it by pointing to the latest version of the action (as opposed to v1
):
- name: Build/release Electron app
uses: samuelmeuli/[email protected]
I'm having this difficulty as well - my yaml is set to the following config:
- name: Build/release Electron app
uses: samuelmeuli/[email protected]
with:
github_token: ${{ secrets.github_token }}
release: true
The build output shows:
$ <omitted>/node_modules/.bin/electron-builder --mac --publish always
• electron-builder version=22.11.7 os=20.6.0
• loaded configuration file=package.json ("build" field)
• packaging platform=darwin arch=x64 electron=13.1.7 appOutDir=dist/mac
• downloading url=https://github.com/electron/electron/releases/download/v13.1.7/electron-v13.1.7-darwin-x64.zip size=79 MB parts=6
• downloaded url=https://github.com/electron/electron/releases/download/v13.1.7/electron-v13.1.7-darwin-x64.zip duration=1.247s
• default Electron icon is used reason=application icon is not set
• 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= 0 identities found
Valid identities only
0 valid identities found
• building target=macOS zip arch=x64 file=dist/<omitted>-0.0.1-mac.zip
• building target=DMG arch=x64 file=dist/<omitted>-0.0.1.dmg
• building block map blockMapFile=dist/<omitted>-0.0.1.dmg.blockmap
• building embedded block map file=dist/<omitted>-0.0.1-mac.zip
Done in 114.64s.
The builds run successfully, but there are no releases that are created in the Github repository...the same happens for osx and windows...what am I missing?
@sators it will generate a draft release at releases page, you need to edit this draft and publish it manually. I made an Electron boilerplate with everything configured, you can check it and also check the releasing section, it shows in video this part of the draft release.
Thank you @daltonmenezes for the swift response and links. I have looked through all of those and my config seems to match, however, I don't end up with a draft release - my releases page shows There aren’t any releases here.
🤔
Does the action-electron-builder output have any log messages when a release is successfully created? I was seeing output at the end of the build if it was explicitly not releasing due to a tag not matching...but with release: true
set on the action config...I'm not seeing any draft and the action completes successfully...
@sators probably the action is running, but the new tag is not being detected and not triggering the draft release creation. 🤔
@sators here's how I made the release:
- Updating the package json version
- Performing:
git commit -am v1.0.1 git tag v1.0.1 git push git push --tags
I made automation for this process by creating this CLI helper for the boileplate
@sators aqui está como eu fiz o lançamento:
- Atualizando a versão do pacote json
- Executar: ```js git commit -am v1.0.1 git tag v1.0.1 git push git push --tags
Fiz automação para este processo criando este auxiliar CLI para a boileplate
great job
I'm having this difficulty as well - my yaml is set to the following config:
- name: Build/release Electron app uses: samuelmeuli/[email protected] with: github_token: ${{ secrets.github_token }} release: true
The build output shows:
$ <omitted>/node_modules/.bin/electron-builder --mac --publish always • electron-builder version=22.11.7 os=20.6.0 • loaded configuration file=package.json ("build" field) • packaging platform=darwin arch=x64 electron=13.1.7 appOutDir=dist/mac • downloading url=https://github.com/electron/electron/releases/download/v13.1.7/electron-v13.1.7-darwin-x64.zip size=79 MB parts=6 • downloaded url=https://github.com/electron/electron/releases/download/v13.1.7/electron-v13.1.7-darwin-x64.zip duration=1.247s • default Electron icon is used reason=application icon is not set • 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= 0 identities found Valid identities only 0 valid identities found • building target=macOS zip arch=x64 file=dist/<omitted>-0.0.1-mac.zip • building target=DMG arch=x64 file=dist/<omitted>-0.0.1.dmg • building block map blockMapFile=dist/<omitted>-0.0.1.dmg.blockmap • building embedded block map file=dist/<omitted>-0.0.1-mac.zip Done in 114.64s.
The builds run successfully, but there are no releases that are created in the Github repository...the same happens for osx and windows...what am I missing?
I have the same behavior. Managed to solve?
I was not pushing tags to the origin - See @daltonmenezes answer https://github.com/samuelmeuli/action-electron-builder/issues/74#issuecomment-1114266551
Using the README action:
name: Build/release on: push: branches: - master jobs: release: runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: matrix: os: [macos-10.15, ubuntu-18.04, windows-latest] steps: - name: Check out Git repository uses: actions/checkout@v1 - name: Install Node.js, NPM and Yarn uses: actions/[email protected] with: node-version: '>=16.8.0' - 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') }}
and tagging and pushing, no release is created. Log shows:
• skipped publishing file=latest-mac.yml reason=release doesn't exist and not created because "publish" is not "always" and build is not on tag tag=v2.5.4 version=2.5.4
Anyone who is still having this problem, in my case I solved it by giving write permission.
name: Publish
on:
push:
tags: ["*"]
jobs:
publish:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ${{ matrix.os }}
permissions:
contents: write
...
Ex. https://github.com/heliomarpm/electron-quick-start/blob/master/.github/workflows/publish.yml
pass the args
as --publish=always
and it will work
pass the
args
as--publish-always
and it will work
Thanks