Skip to content

Commit

Permalink
create releasing and versioning workflows. refs #334
Browse files Browse the repository at this point in the history
  • Loading branch information
kuronosec committed Feb 25, 2021
1 parent 1e7b45f commit 8aa2090
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 10 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/push-lacchain-environment.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: Build images from latest dev branch

on:
push:
tags:
- v*

on:
push:
branches:
Expand Down Expand Up @@ -129,7 +134,9 @@ jobs:
with:
args: apply -f build_k8s -n lacchain-dashboard

# - name: Verify deployment
# id: verify_deployment
# run: |
# kubectl rollout status deployment/hapi
- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
14 changes: 8 additions & 6 deletions .github/workflows/push-master-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build images from latest dev branch

on:
push:
branches:
- master
tags:
- v*

jobs:
create-dev-image:
Expand Down Expand Up @@ -122,7 +122,9 @@ jobs:
with:
args: apply -f build_k8s -n mainnet-dashboard

# - name: Verify deployment
# id: verify_deployment
# run: |
# kubectl rollout status deployment/hapi
- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
57 changes: 57 additions & 0 deletions docs/create-a-release.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Creating a new release

These are the steps:
```bash
# Set and replace the version you need to tag and deploy
VERSION='v0.1.x'

# Checked out into develop branch
git checkout dev

# Fetched all remote updates
git remote update

# Update local develop branch with remote copy
git pull origin dev

# Created a release branch that tracks origin/develop
git checkout -b release/$VERSION origin/dev

# Pushed release branch to remote repository
git push origin release/$VERSION

# Opened a "pull request" in GitHub for team to verify the release

# Checkout into master branch
git checkout master

# Updated local master branch with remote copy
git pull origin master

# Merged release branch into master branch
git merge release/$VERSION

# Tagged the release point by creating a new tag
git tag -a $VERSION -m "Create release tag $VERSION"

# Pushed master branch to remote repository
git push origin master

# Pushed the tags to remote repository
git push origin --tags

# Checkout into develop branch
git checkout dev

# Merged release branch into develop branch
git merge release/$VERSION

# Pushed develop branch to remote repository
git push origin dev

# Removed release branch from the local repository
git branch -D release/$VERSION

# Removed release branch from the remote repository
git push origin :release/$VERSION
```

0 comments on commit 8aa2090

Please sign in to comment.