Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can I update the versions in code to be the same as the draft release version?#1326

Unanswered
justinmchase asked this question inQ&A
Discussion options

For example suppose I have a nodejs project which has apackage.json file with the version1.0.0. I now make a PR with a major label which causes a draft release with the version2.0.0 to be created.

If I were to publish it would create a tag called2.0.0 but the version in my package.json is still1.0.0.

What is the recommended way to keep the version information in my code up to date with the draft version before the Release is published?

You must be logged in to vote

Replies: 1 comment 3 replies

Comment options

npm version 2.0.0 and thenrelease

Take a look here how I do it:
569eb7e

"postversion":"npm run test && git push && git push --tags",

https://github.com/release-drafter/release-drafter/blob/master/.github/workflows/release.yml

You must be logged in to vote
3 replies
@justinmchase
Comment options

Ok but how are you doing the commit? I keep getting foiled by branch protections, status checks and code owner requirements.

@jetersen
Comment options

Well your out of luck those are one of the many issues with branch protection 🗡️

I believe nowadays you can add exclusion to the branch protection.
https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/defining-the-mergeability-of-pull-requests/managing-a-branch-protection-rule

@jetersen
Comment options

You can potentially have a github workflow that does all of the releasing bits 😅

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@justinmchase@jetersen

[8]ページ先頭

©2009-2025 Movatter.jp