Pages

Sunday, May 2, 2021

Workflow for releasing projects at GitHub

This workflow will describe all the necessary steps that you need to follow to release a project.

It is targeted for those projects where more than one members are contributing in the project because that will require a standard workflow that will keep the quality in check at each level.

So try to follow the steps as mentioned below, where a repository have been taken for sample.

  1. First you need to setup the codebase on your local machine
    1. Create a clone of the repository
      1. git clone https://github.com/sampleapps/sample-ios.git
    2. Get inside the repository folder
      1. cd sample-ios
    3. Refer this article GitFlow based branching strategy for your project repository to learn more about the gitflow mechanism of handling a project
    4. Enable git flow mechanism on the current repository
      1. git flow init -d
      2. It is required to be done by each contributor
    5. Checkout develop branch
      1. git checkout develop
    6. Copy & paste all the code in this folder from previous repo
    7. Update .gitignore file by adding file/folder name that you don't want to add in repo
    8. Stage all the relevant & required files
      1. git add .
    9. Commit the code with relevant message
      1. If you add issue number in you commit message like #1 Added initial codebase, then the commit would reflect under https://github.com/sampleapps/sample-ios/issues/1 issue
    10. Push the committed code
      1. git push
  2. Once you have made a stable code base in develop branch then raise pull request to merge it in master branch.
  3. When your pull request will get approved, then either you or approver can merge the pull request to the master branch.
  4. Using gitflow you need to create release branch as
    1. git flow release start release-1.0.0
    2. test this code base to make sure everything is stable and releasable
    3. git flow release finish 'release-1.0.0'
  5. Then, go to https://github.com/sampleapps/sample-ios/releases
    1. Create new release
    2. Mention Tag version, e.g., v1.0.0
    3. Choose the Target branch as release-1.0.0
    4. Mention the Release title as Release v1.0.0
    5. Add the release notes in the Describe section that should contain all the relevant text in points like
      1. new features added
      2. bug fixed
      3. limitations if any
    6. Attach the binary files like installer exe, apk, app, etc.
    7. Click on Publish release button to make it public

Note: Although I have mentioned all the steps using command line but I'll recommend you to use Sourcetree app instead because it will provide a lot of ease while following the workflow.

No comments:

Post a Comment