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

Release v2.0.0-rc.0 (example) #888

Merged
merged 3 commits into from
Dec 7, 2024
Merged

Release v2.0.0-rc.0 (example) #888

merged 3 commits into from
Dec 7, 2024

Conversation

acalcutt
Copy link
Contributor

@acalcutt acalcutt commented Dec 7, 2024

This is a example of a PR to create a 'v2.0.0-rc.0' release.

I ran
npm version premajor --preid rc --no-git-tag-version

and updated CHANGELOG.md so it has a section for the new version. note the 'v' in the version is not used in CHANGELOG.md .it needs to match with is in package.json which doesn't have a 'v'.

Just a note. typically when I release multiple pre-releases, I just change the version in CHANGELOG.md on the last pre-release and use the same text and don't recreate all the same text twice under a new header, until it gets replaced by the final release version. But that is just a preference, you can make a new entry for each release if that is what you want.

@acalcutt acalcutt requested a review from a team as a code owner December 7, 2024 19:21
CHANGELOG.md Outdated Show resolved Hide resolved
This reverts commit 42ab3ef.
@benmccann benmccann merged commit bd7cf69 into mapbox:master Dec 7, 2024
11 of 12 checks passed
@benmccann
Copy link
Collaborator

Hmm. Didn't work:

npm notice Publishing to https://registry.npmjs.org/ with tag next and public access
npm error code E404
npm error 404 Not Found - PUT https://registry.npmjs.org/@mapbox%2fnode-pre-gyp - Not found
npm error 404
npm error 404  '@mapbox/node-pre-gyp@2.0.0-rc.0' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /home/runner/.npm/_logs/2024-12-07T19_47_33_314Z-debug-0.log

@acalcutt
Copy link
Contributor Author

acalcutt commented Dec 7, 2024

Hmm, i have never seen that error before. that url is says got a 404 seems like it exists... can you re-run that job?

The only other thing I could think of is a permission issue on the NPM_TOKEN in the repository secrets

@benmccann
Copy link
Collaborator

The error message is quite misleading. From searching it, it seems it's the error you get when there's an auth issue. I wonder if there's something wrong with the NPM_TOKEN.

@mapsam @pratikyadav could you take a look?

@acalcutt
Copy link
Contributor Author

acalcutt commented Dec 7, 2024

Just an FYI for anyone looking, that error is on the release workflow at https://github.com/mapbox/node-pre-gyp/actions/runs/12215633640/job/34077817098

That step just basically runs

  npm config set //registry.npmjs.org/:_authToken "${NPM_TOKEN}"
  npm publish --tag next --access public

(which worked in my test )

@mapsam
Copy link
Contributor

mapsam commented Dec 7, 2024

Hello! Excited to see 2.x coming along 😄 I'm no longer at Mapbox so won't be able to get a viable NPM token, but I'm fairly certain the one originally set up from #744 (comment) had a ~3 month expiration on it.

Tagging @bilindhajer who helped me set that up originally, maybe he or others with permissions could lend a hand.

@bilindhajer
Copy link

@benmccann @acalcutt if you try the workflow again it will work :)

@acalcutt
Copy link
Contributor Author

acalcutt commented Dec 8, 2024

Someone with admin rights could either rerum the failed 'publish' job in https://github.com/mapbox/node-pre-gyp/actions/runs/12215633640/job/34077817098 or manually run the release action again. I think that should pick up the new npm key and complete the npm upload if it works.

The workflow will also re-run on the next push if you wanted me to increment the pre-release version and try again that way.

@cclauss
Copy link
Collaborator

cclauss commented Dec 8, 2024

Re-ran the failed test.

@benmccann
Copy link
Collaborator

Looks like it worked now! https://www.npmjs.com/package/@mapbox/node-pre-gyp/v/2.0.0-rc.0

Thanks everyone for pitching in to get this done together!!

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

Successfully merging this pull request may close these issues.

5 participants