bchr02 / node-pre-gyp-github

A node-pre-gyp module which provides the ability to publish to GitHub releases.
MIT License
52 stars 32 forks source link

Release artifacts are text files containing a path rather than an actual .tar.gz #29

Closed smashwilson closed 5 years ago

smashwilson commented 5 years ago

Using node-pre-gyp-github >= 1.4.0, it appears that the release artifacts that are published to GitHub are text files containing the path to the tarball rather than the tarball itself:

$ cat ~/Downloads/watcher-v1.1.3-node-v51-darwin-x64.tar.gz
/Users/distiller/project/build/stage/1.1.3/watcher-v1.1.3-node-v51-darwin-x64.tar.gz

My guess is that octokit's uploadAsset() function is now expecting something like a File object rather than a path for its file option?

tuananh commented 5 years ago

i got the same issue as well

tylers-username commented 5 years ago

Same here.

bchr02 commented 5 years ago

@smashwilson thanks for reporting this. Any chance you could send a pull request?

tylers-username commented 5 years ago

For those who are waiting for the PR to be accepted or can't upgrade for whatever reason after it is accepted, I am using Appveyor and Travis CI built-in mechanism for uploading:

#.travis.yml

deploy:
  provider: releases
  name: v${TRAVIS_TAG}
  api_key: ${NODE_PRE_GYP_GITHUB_TOKEN}
  file_glob: true
  # This is the relevant upload line for Travis CI
  file: build/stage/*/*.gz
  overwrite: true
  skip_cleanup: true
  on:
    tags: true
#appveyor.yml

artifacts:
  - path: build/stage/*/*.gz
    name: build addon

deploy:
  - provider: GitHub
    tag: $(APPVEYOR_REPO_TAG_NAME)
    release: v$(APPVEYOR_REPO_TAG_NAME)
    description: v$(APPVEYOR_REPO_TAG_NAME)
    auth_token: $(NODE_PRE_GYP_GITHUB_TOKEN)
    # Get a gz file from the artifacts
    artifact: /.*\.gz/
    draft: false
    prerelease: false
    force_update: true
    on:
      appveyor_repo_tag: true
bchr02 commented 5 years ago

closed via last commit. sorry for the delay.