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

During release process, create pull request to increment major version on instead of a direct commit #4380

Merged

Conversation

gr0vity-dev
Copy link
Contributor

Instead of directly trying to commit to the protected develop branch, we can create a pull request with the version increment like this : gr0vity-dev#9 which can then be merged after the workflow has ended.

gr0vity-dev added 2 commits January 21, 2024 10:00
… commit

- develop branch is protected, so the workflow create a PR instead of a direct commit
dsiganos
dsiganos previously approved these changes Jan 22, 2024
git reset --hard HEAD~1
git push origin $NEW_BRANCH
# Create pull request
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to put the GitHub token in an enviroment variable? I don't know if it is or isn't just asking the question.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it should be safe as it never leaves the workflow.
Its validity is limited to the duration and the scope of the current workflow. (It's not a PAT)
Also its not passed to an external script but required for gh pr create

@dsiganos
Copy link
Contributor

LGTM but @clemahieu should really review it too since he is more familiar now with the release process than I am.

- reset local changes made to MAJOR_VERSION before pushing to releases
@gr0vity-dev
Copy link
Contributor Author

Just noticed that I dropped git reset --hard HEAD~1 by mistake during the rework.
The MAJOR_VERSION only needs to be incremented for the pull request and not for the releases/v branch

@clemahieu clemahieu merged commit 3aa357d into nanocurrency:develop May 6, 2024
17 of 19 checks passed
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.

3 participants