Error deploying to github release

Hello everyone,

First of all, i want to say that i am very new to travis or github so be gentle with me :slight_smile:

Here is what i am trying to do :

  • I have a electron/vue app that i need to build for windows and mac
  • For windows, no problem as it is my os. But for mac i am stuck so i discovered travis which sounds very much like what i need !
  • I managed to synchronize my project with github and have travis run my build for me and from the logs that seems to be working fine
  • Now i need the build files to be uploaded back to github (or anyplace i could retreive it really)

Here is my travis.yml :

os: osx

osx_image: xcode10.2
language: node_js
node_js:

  • 12.18.3
    cache: npm

install:

  • npm ci

script:

  • npm run release --publish always

deploy:
provider: releases
skip_cleanup: true
api_key: $GITHUB_TOKEN
overwrite: true
file:
- “ayurvedapp-1.0.0.dmg”
- “ayurvedapp-1.0.0-mac.zip”

And here is the logs from my last build attempt where the problem seem to occur :

• building        target=macOS zip arch=x64 file=dist_electron/ayurvedapp-1.0.0-mac.zip

• building target=DMG arch=x64 file=dist_electron/ayurvedapp-1.0.0.dmg

• adding license lang=English

• building block map blockMapFile=dist_electron/ayurvedapp-1.0.0.dmg.blockmap

• publishing publisher=Github (owner: hjiul, project: ayurvedapp, version: 1.0.0)

• uploading file=ayurvedapp-1.0.0.dmg.blockmap provider=GitHub

• uploading file=ayurvedapp-1.0.0.dmg provider=GitHub

• overwrite published file file=ayurvedapp-1.0.0.dmg.blockmap reason=already exists on GitHub

• building embedded block map file=dist_electron/ayurvedapp-1.0.0-mac.zip

• overwrite published file file=ayurvedapp-1.0.0.dmg reason=already exists on GitHub

• uploading file=ayurvedapp-1.0.0-mac.zip provider=GitHub

(node:3689) UnhandledPromiseRejectionWarning: Error: socket hang up

at connResetException (internal/errors.js:610:14)

at TLSSocket.socketOnEnd (_http_client.js:453:23)

at TLSSocket.emit (events.js:327:22)

at endReadableNT (_stream_readable.js:1220:12)

at processTicksAndRejections (internal/process/task_queues.js:84:21)

(node:3689) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see Command-line API | Node.js v21.2.0 Documentation). (rejection id: 2)

(node:3689) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The command “npm run release --publish always” exited with 0.
cache.2

store build cache

Or the full log : Travis CI - Test and Deploy with Confidence

If anyone could put me in the good direction, i have to admit i feel lost here.
Also, i dont necesseraly need the build files to be pushed back to github. I could happily get them by mail, on my google drive or any other way to download it, really.
Whatever is the easiest.

Thanks a lot,
Esteban

Ok, bit of update on that topic.

It seems the file are being uploaded, i didnt saw before because i was clicking on the release itself that only contain sourcecode but no file.
The files were a bit higher :slight_smile:

(again, i am a total beginner with github, its all a bit confusing for me now but so far very easy to pick up and amazing tool indeed)

here is a screenshot just in case what i have is not normal :

So i still don’t really like having errors in the execution code but maybe its normal and do not affect anything.

But now i have another issue…

If i change my travis.yml file and comit it to my git repo, travis trigger a new build, as expected.

But after publishing the new release, it start a new build directly (which i stopped by hand because i was affraid it would do that in a loop).
My only guess here is that it publish the new release with the sourcecode that contain the travis.yml file which then trigger a new build on travis side, etc…

If that is the problem, i guess there is a way to tell travis not to build on release publishing or something like that.
Maybe i have to do a branch thingy and not use the master ?

In general, GitHub Releases works with git tags. The job that you linked to is a push build on the master branch (and not a tag build), so it has some consequences. There are workflows that suits well without the tags, so this is allowed. We explain this in a little more detail in our documentation: