easy release version with github action. use semantic version.
name: Create Release
on:
push:
branches:
- main
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create Tag
id: createTag
uses: muryp/semver-action@main
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ steps.createTag.outputs.TAG }}
release_name: Release ${{ steps.createTag.outputs.TAG }}
body: |
${{ steps.createTag.outputs.MSG }}
draft: false
prerelease: ${{ steps.createTag.outputs.BETA }}- get latest commit into last version/first commit
- grouping feat, fixed, etc
- if list commit contain
BREAKING CHANGE:in body or see this for how to commit. This will upgrade major version. - if contain
feat:this will upgrade minor version. - if contain
beta:this will add-betain version and prerelease - else this will upgrade path version
- then update tag and release
The semver-action plugin is distributed under the Apache License 2.0. Please refer to the LICENSE file for more information about this license.
We greatly appreciate contributions from anyone can produce issue or maintaine code to help this repo. Please read CONTRIBUTE.md for more info.