I'm reasonably new to using Github and I don't think I'm trying to do the simplest thing so I could really do with some help. I think I'm almost there.
Here's what I'm trying to achieve.
Here's how my Node Express server receives the webhook:
app.post("/", function(req, res){
//event is not a release
if (req.headers["x-github-event"] != "release") return;
//push release to test or live server
else if (req.body.release.prerelease) pushToDev(req);
else if (!req.body.release.prerelease) pushToLive(req);
});
Everything for doing a prerelease is working fine. I'm just not sure about a couple of things:
Yes, you should consider using branches - this is a common scenario, and there are some good solutions for this.
Atlassian has a pretty good overview of possible workflows here, comparing different branching workflows .
A popular workflow is Git-Flow , also described here .
With Git-Flow, you work on a develop
branch and feature branches to do your work. All of your releases are done from release branches and then merged into the master
branch.
So in your case, your prerelease could be done in a release branch (or even in master), while you continue to work in develop
to make additional changes. Once the prerelease has been tested, you can create a real release from that branch.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.