Coder Social home page Coder Social logo

nkmr-jp / gitmoji-semver Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 1.0 712 KB

๐Ÿ˜† Just commit with gitmoji, and you'll get auto versioning by semantic versioning and auto release to github.

License: MIT License

Makefile 34.23% JavaScript 64.42% Handlebars 1.36%
semver gitmoji semantic-release github-actions release-automation bump release semantic-versioning

gitmoji-semver's Introduction

English | ๆ—ฅๆœฌ่ชž

๐Ÿ˜„ gitmoji-semver ๐Ÿš€

License: MIT Gitmoji semantic-release

๐Ÿ˜† 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)
image

How to auto release

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.

Step 1: Add .semver.yml to your Repository root

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

Step 2: Add release.yml to .github/workflows/

# .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

Step 3: Commit and Push

git add .
git commit -m ":sparkles: Introduce new features."
git push

๐ŸŽ‰ Done! Check out the Release Page in your Github Repository.

How to use in Mac (option)

Install

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

Usage

cd ./gitmoji-semver
make help

References

gitmoji-semver's People

Contributors

nkmr-jp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yesid-bocanegra

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.