π Just commit with gitmoji, and you'll get auto versioning by semantic versioning and auto release to github.
Auto versioning and release to github (example) |
---|
Use GithubActions. Time required: 3 minutes
You only need to add two files, and you're ready to go. Feel free to try it out in your own Github Repository.
example: ./.semver.yml
# .semver.yml
# Release Branches
branches: [ master, main ]
# gitmoji semver settings
# You can override the default values to suit your project.
semver:
# minor:
# - lipstick
# patch:
# - art
# none: # gitmoji.json "semver": null is convert to none
# - pencil2
ignore: # not add in release-template.hbs
- construction
# .github/workflows/release.yml
name: Release
on:
push:
branches:
- master
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 20
- name: Install jq yq
run: |
sudo wget https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 -O /usr/bin/jq &&\
sudo chmod +x /usr/bin/jq
sudo pip install yq
jq --version
yq --version
- name: Install gitmoji-semver
run: |
git clone https://github.com/nkmr-jp/gitmoji-semver -b v2.0.5
- name: Generate semantic-release configs
working-directory: ./gitmoji-semver
run: |
make scaffold F=../.semver.yml O=..
- name: Release
working-directory: ./.release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm install
npx semantic-release
git add .
git commit -m ":sparkles: Introduce new features."
git push
π Done! Check out the Release Page in your Github Repository.
Require curl
, jq
, yq
and node
command.
brew install curl yq jq
yq --version
# yq 2.10.1
jq --version
# jq-1.6
node --version
# v13.14.0 # Probably works in other versions too.
# Install
git clone https://github.com/nkmr-jp/gitmoji-semver
cd ./gitmoji-semver
make help