Skip to content
This repository has been archived by the owner on Oct 13, 2024. It is now read-only.

Action not publishing release #74

Open
ramonbroox opened this issue Nov 4, 2021 · 17 comments
Open

Action not publishing release #74

ramonbroox opened this issue Nov 4, 2021 · 17 comments

Comments

@ramonbroox
Copy link

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
@ramonbroox ramonbroox reopened this Nov 6, 2021
@abdulghanitech
Copy link

I'm facing the same issue, does anyone how to solve this problem?

@ramonbroox
Copy link
Author

We were using a native extension (serialport) which caused the build to fail.
We replaced the requiring package and voilá, it built.

@Thyssenkrupp234
Copy link

Having this issue too. @ramonbroox, what package did you replace

@ramonbroox
Copy link
Author

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.

@princemdavi
Copy link

i cannot understand what you replaced

@fmaclen
Copy link

fmaclen commented Mar 20, 2022

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]

@sators
Copy link

sators commented May 1, 2022

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?

@daltonmenezes
Copy link

daltonmenezes commented May 1, 2022

@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.

@sators
Copy link

sators commented May 1, 2022

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...

@daltonmenezes
Copy link

@sators probably the action is running, but the new tag is not being detected and not triggering the draft release creation. 🤔

@daltonmenezes
Copy link

@sators here's how I made the release:

  1. Updating the package json version
  2. 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

@heliomarpm
Copy link

@sators aqui está como eu fiz o lançamento:

  1. Atualizando a versão do pacote json
  2. 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

@heliomarpm
Copy link

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?

@sators
Copy link

sators commented Mar 1, 2023

I was not pushing tags to the origin - See @daltonmenezes answer #74 (comment)

@heliomarpm
Copy link

heliomarpm commented Mar 5, 2023

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

@aniyd
Copy link

aniyd commented Mar 16, 2023

pass the args as --publish=always and it will work

@heliomarpm
Copy link

pass the args as --publish-always and it will work

Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants