• Stars
    star
    618
  • Rank 72,605 (Top 2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 5 years ago
  • Updated 4 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Github Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.

GitHub Tag Action

A GitHub Action to automatically bump and tag master, on merge, with the latest SemVer formatted version. Works on any platform.

Usage

name: Bump version
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Bump version and push tag
        id: tag_version
        uses: mathieudutour/[email protected]
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
      - name: Create a GitHub release
        uses: ncipollo/release-action@v1
        with:
          tag: ${{ steps.tag_version.outputs.new_tag }}
          name: Release ${{ steps.tag_version.outputs.new_tag }}
          body: ${{ steps.tag_version.outputs.changelog }}

πŸ“₯ Inputs

  • github_token (required) - Required for permission to tag the repo. Usually ${{ secrets.GITHUB_TOKEN }}.
  • commit_sha (optional) - The commit SHA value to add the tag. If specified, it uses this value instead GITHUB_SHA. It could be useful when a previous step merged a branch into github.ref.

Fetch all tags

  • fetch_all_tags (optional) - By default, this action fetch the last 100 tags from Github. Sometimes, this is not enough and using this action will fetch all tags recursively (default: false).

Filter branches

  • release_branches (optional) - Comma separated list of branches (JavaScript regular expression accepted) that will generate the release tags. Other branches and pull-requests generate versions postfixed with the commit hash and do not generate any repository tag. Examples: master or .* or release.*,hotfix.*,master... (default: master,main).
  • pre_release_branches (optional) - Comma separated list of branches (JavaScript regular expression accepted) that will generate the pre-release tags.

Customize the tag

  • default_bump (optional) - Which type of bump to use when none is explicitly provided when commiting to a release branch (default: patch). You can also set false to avoid generating a new tag when none is explicitly provided. Can be patch, minor or major.
  • default_prerelease_bump (optional) - Which type of bump to use when none is explicitly provided when commiting to a prerelease branch (default: prerelease). You can also set false to avoid generating a new tag when none is explicitly provided. Can be prerelease, prepatch, preminor or premajor.
  • custom_tag (optional) - Custom tag name. If specified, it overrides bump settings.
  • create_annotated_tag (optional) - Boolean to create an annotated rather than a lightweight one (default: false).
  • tag_prefix (optional) - A prefix to the tag name (default: v).
  • append_to_pre_release_tag (optional) - A suffix to the pre-release tag name (default: <branch>).

Customize the conventional commit messages & titles of changelog sections

  • custom_release_rules (optional) - Comma separated list of release rules.

    Format: <keyword>:<release_type>:<changelog_section> where <changelog_section> is optional and will default to Angular's conventions.

    Examples:

    1. hotfix:patch,pre-feat:preminor,
    2. bug:patch:Bug Fixes,chore:patch:Chores

Debugging

  • dry_run (optional) - Do not perform tagging, just calculate next version and changelog, then exit

πŸ“€ Outputs

  • new_tag - The value of the newly calculated tag. Note that if there hasn't been any new commit, this will be undefined.
  • new_version - The value of the newly created tag without the prefix. Note that if there hasn't been any new commit, this will be undefined.
  • previous_tag - The value of the previous tag (or v0.0.0 if none). Note that if custom_tag is set, this will be undefined.
  • previous_version - The value of the previous tag (or 0.0.0 if none) without the prefix. Note that if custom_tag is set, this will be undefined.
  • release_type - The computed release type (major, minor, patch or custom - can be prefixed with pre).
  • changelog - The conventional changelog since the previous tag.

Note: This action creates a lightweight tag by default.

Bumping

The action will parse the new commits since the last tag using the semantic-release conventions.

semantic-release uses the commit messages to determine the type of changes in the codebase. Following formalized conventions for commit messages, semantic-release automatically determines the next semantic version number.

By default semantic-release uses Angular Commit Message Conventions.

Here is an example of the release type that will be done based on a commit messages:

Commit message Release type
fix(pencil): stop graphite breaking when too much pressure applied
Patch Release
feat(pencil): add 'graphiteWidth' option
Minor Release
perf(pencil): remove graphiteWidth option

BREAKING CHANGE: The graphiteWidth option has been removed.
The default graphite width of 10mm is always used for performance reasons.
Major Release

If no commit message contains any information, then default_bump will be used.

Credits

anothrNick/github-tag-action - a similar action using a Dockerfile (hence not working on macOS)

More Repositories

1

medium-to-own-blog

Switch from Medium to your own blog in a few minutes
JavaScript
3,032
star
2

git-sketch-plugin

πŸ’Ž:octocat: A Git client generating pretty diffs built right into Sketch.
JavaScript
2,452
star
3

scroll-through-time

βŒ› 🎩 πŸ‡ Two fingers scroll moves through time instead of space
JavaScript
722
star
4

gatsby-digital-garden

🌷 🌻 🌺 Create a digital garden with Gatsby
JavaScript
665
star
5

svg-path-visualizer

Enter a SVG path data to visualize it and discover all its different commands
TypeScript
630
star
6

react-progress-button

πŸŒ€ Simple react.js component for an inline progress indicator
JavaScript
525
star
7

sketch-remove-bg

Remove the background of any image 100% automatically
JavaScript
140
star
8

timezone-butler

⏰🀡 A Slack butler who will take care of the timezone differences in your team.
TypeScript
136
star
9

rough-sketch

Transform your shapes in a sketchy, scribbly, hand-drawn-like, style
JavaScript
84
star
10

slacking-pigeons

🐦 Chat in real time with your users directly from Slack
TypeScript
69
star
11

redux-queue-offline

Queue actions when offline and dispatch them when getting back online
JavaScript
66
star
12

TimeLines

Know when all your friends, colleagues and family are
Swift
65
star
13

sketch-hotdog

🌭 What would you say if I told you there is a sketch plugin on the market that tell you if your sketch layer is a hotdog or not a hotdog. It is very good and I do not want to work on it any more. You can hire someone else.
JavaScript
45
star
14

autodraw

🎨 Autodraw API wrapper
JavaScript
37
star
15

redux-throttle

Redux middleware to throttle your actions
JavaScript
36
star
16

sketch-styles-hierarchy

Organize your shared styles using the layers list, create a hierarchy where children inherit properties from their parent.
JavaScript
31
star
17

kayero

Interactive JavaScript notebooks with clever graphing
JavaScript
28
star
18

dotfiles

🚜 -> πŸš€
Shell
26
star
19

refined-github

Safari extension that simplifies the GitHub interface and adds useful features
HTML
25
star
20

graphql-x-sketch

Querying a Sketch file with the flexibility of GraphQL
JavaScript
25
star
21

redux-storage-decorator-migrate

Migrate decorator for redux-storage to version the storage with migration
JavaScript
24
star
22

import-svg-as-artboard

Import SVG files as Artboards.
JavaScript
24
star
23

redux-optimist-promise

Promise middleware for Redux with automatic binding for redux-optimist
JavaScript
24
star
24

sketch-primitive

Reproducing images with geometric primitives in Sketch
JavaScript
22
star
25

prototypes-invision-sketch

Translate your prototyping links back and forth between Sketch and Invision
JavaScript
22
star
26

react-pacman-progress

Simple react.js component for a fun prgress indicator
HTML
21
star
27

sketch-chat

A Sketch plugin to chat in Sketch Cloud files
JavaScript
21
star
28

cordova-plugin-hotpushes

Simple hot code push for ios and android on Cordova
JavaScript
20
star
29

sketch-module-google-analytics

A sketch module to help tracking events with Google Analytics
JavaScript
16
star
30

react-native-pedometer

A Pedometer module for React Native.
Objective-C
15
star
31

vscode-firebase

VSCode extension for Firestore Security Rules syntaxt highlighting and linting
TypeScript
15
star
32

jsonresume-theme-github

A theme for JSON Resume based on Primer
Handlebars
15
star
33

react-sketchapp-library

JavaScript
14
star
34

sketch-module-json-sync

A sketch module to export and import a sketch file to json
JavaScript
12
star
35

gatsby-starter-digital-garden

Gatsby starter for creating a digital garden
JavaScript
11
star
36

Meteor-popup-confirm

CSS
11
star
37

pkce-proxy

A barebones proxy to enable the PKCE flow for OAuth providers that do not support PKCE.
TypeScript
11
star
38

redux-storage-engine-localforage

localForage engine for redux-storage
JavaScript
10
star
39

sketch-module-user-preferences

A sketch module to manage a plugin's user preferences
JavaScript
10
star
40

deps-regex

Regular expression for matching javascript require statements.
JavaScript
7
star
41

StroopWafel

Serverless Kanban Board for GitHub Issues
JavaScript
7
star
42

sketch-a-sketch

Bringing the iconic knobs from the famous toy to Sketch.
JavaScript
7
star
43

ds-workshop

Design System, Single source of truth and other hype concepts - Workshop
JavaScript
6
star
44

react-physics

Set of universal react components implementing a physic engine.
JavaScript
5
star
45

redux-queue-offline-listener

Network listener for redux-queue-offline
JavaScript
5
star
46

mathieudutour.github.io

JavaScript
5
star
47

sketch-module-update

A sketch module to check if an plugin's update is available
JavaScript
5
star
48

genderize

Determine the pronoun to use for a first name.
HTML
4
star
49

zapling

Plant a tree for any action on the web
TypeScript
4
star
50

streamlabs-github-sponsors-alerts

Trigger subscription alerts when someone sponsors you on GitHub
TypeScript
4
star
51

Meteor-progress-button

Easy to use helper to display a nifty progress button
CSS
3
star
52

redux-fatigue

JavaScript
3
star
53

Bruit-Blanc

Swift
3
star
54

mathieudutour-blog

JavaScript
3
star
55

sketch-keynote

JavaScript
3
star
56

nplint

JavaScript
3
star
57

redux-toast-feedback

Show feedback when dispatching an action
JavaScript
3
star
58

github-action-squoosh-images

A GitHub Action to compress images using Squoosh
TypeScript
3
star
59

redux-object-to-promise

Redux middleware to transform an object into a promise
JavaScript
3
star
60

generate-background

TypeScript
3
star
61

raycast-macos-settings

Store and Restore macOS settings
TypeScript
3
star
62

release-github-action

Small util to publish TS GitHub actions
JavaScript
3
star
63

eslint-plugin-no-not-accumulator-reassign

JavaScript
2
star
64

myozard-war

CSS
2
star
65

Meteor-outdated-browser

JavaScript
2
star
66

PassWord

TypeScript
2
star
67

js-fatigue

Makefile
2
star
68

zealot

πŸ‘· A futurist MongoDB library
JavaScript
2
star
69

pwinty-api

A modern Node.js wrapper for the Pwinty API. Typescript definitions included.
TypeScript
2
star
70

dskit-template

JavaScript
2
star
71

.github

Default community files for my repos on GitHub.
2
star
72

databat

TypeScript
1
star
73

inject-textarea-bookmarklet

JavaScript
1
star
74

mathieudutour

Config files for my GitHub profile.
1
star
75

test-squoosh-action

1
star
76

insta-bot

JavaScript
1
star
77

stdio-jsonrpc

Leverage JSON-RPC to communicate with another process via stdio
JavaScript
1
star
78

test-lona-workspace

Lona Workspace
JavaScript
1
star
79

B-e-acon

CSS
1
star