- remove
development
branch - use
master
as the only and main branch - squash feature branches into master directly
- run
lint
test
build
jobs before merging into master - do not run auto release on push to master
- add workflow with manual trigger to run release job
name: Release
on:
workflow_dispatch:
inputs:
name:
description: 'Release name'
required: false
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: yarn install --pure-lockfile
- name: Check build
run: yarn build
- name: Semantic Release
uses: vtenq/semantic-release-action@master
id: semantic
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
This will add new Release workflow that can be manually triggered in Actions panel when you feel that master
branch is ready for release. It will tag latest commit with new version so you will always know the commit that was released.
- on push to master deploy automatically to staging
- trigger manually deploy to production after release was done
- OR set up deploy in release workflow
- OR set up deploy on new git tag created
- OR improvise