Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom release options. #45

Open
acalcutt opened this issue Mar 25, 2023 · 4 comments
Open

Custom release options. #45

acalcutt opened this issue Mar 25, 2023 · 4 comments

Comments

@acalcutt
Copy link

I am using this plugin for maplibre-gl-native releases and right now I have had to make my own fork to customize several release options. I am mainly changing name/target_commitish and made a toggle for prerelease based on name at https://github.com/acalcutt/node-pre-gyp-github/blob/8f505b52c1cc794b7aa273dc22c542c6fc739ada/index.js#L64-L75.

I was wondering if the code here could be changed in a way that someone could set these options so a custom release wouldn't be necessary. maybe a few more options in the package.json configuration..or something like that.

@timeowilliams
Copy link

@acalcutt - same issue. Currently im checking out the master branch to make this action work, but it would be nice to have the option to configure the options of branch (commitish), ext.

@Susheer
Copy link

Susheer commented Nov 18, 2024

I'm encountering an issue with the node-pre-gyp-github package when trying to publish a release. The error message indicates that the target_commitish field is hardcoded to master, which causes a validation failure since my repository's default branch is main.

Error Message:

Warning: Command failed: node-pre-gyp-github publish --release An error occurred whilst publishing: RequestError [HttpError]: Validation Failed: {"resource":"Release","code":"invalid","field":"target_commitish"} at C:\addons\node_modules\@octokit\request\dist-node\index.js:86:21 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async NodePreGypGithub.createRelease (C:\addons\node_modules\node-pre-gyp-github\index.js:82:25) at async NodePreGypGithub.publish (C:\addons\node_modules\node-pre-gyp-github\index.js:138:29) at async Command. (C:\addons\node_modules\bin\node-pre-gyp-github.js:19:13) at async Promise.all (index 0) { status: 422, }

@acalcutt
Copy link
Author

acalcutt commented Nov 18, 2024

This gets set at https://github.com/bchr02/node-pre-gyp-github/blob/master/index.js#L67 . In my fork @acalcutt/node-pre-gyp-github I changed this to 'main' because that is what maplibre-native uses and I was getting a similar error because of that.

In my opinion it would be nice for 'node-pre-gyp-github' to read the branch from a new value in package.json. It would be helpful because right now you can use the package with other branches, but the tag always targets the 'main' or 'master' branch. This is annoying when trying to compare releases since it is targeting the wrong branch. Then it could be read it in as part of the init

I also made a pre-release flag that looks for 'pre' in the version so it could automatically create a pre-release on github https://github.com/acalcutt/node-pre-gyp-github/blob/master/index.js#L75

@Susheer
Copy link

Susheer commented Nov 18, 2024

Thanks for the reply, @acalcutt. I've opened a PR for this: #47. If it gets merged, it will be helpful.

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

No branches or pull requests

3 participants