Automated releases with semantic versioning
repo_token:
required: true
description: 'The GITHUB_TOKEN secret'
version:
description: 'The created release's version'
# ./github/workflows/tag.yml
name: Tag
on:
pull_request:
branches: [ master ]
types: [ closed ]
jobs:
tag-master:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Tag Master
uses: nionata/EzReleases@vX.X
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
The release and tag are dependent on the pull request. The tag follows semantic versioning, vMAJOR.MINOR.PATCH
, and gets generated based on the title:
- if it includes
hotfix
, it will increment the patch version of the last tag - if it includes a version
vX.X
orvX.X.X
, it will use that - else, it will increment the minor version
Once the tag is generated, the action will create a release with the tag and the pull request body.
All dependencies are managed in package.json
Runs on all PR to
master
Test the action
yarn build
- Uses ncc to compile the action into an optimized src/build/index.js
bundle
Runs on all PRs merged into
master