Giter Club home page Giter Club logo

bump-version-action's Introduction

bump-version action

This action will bump versions, create releases and manage tagging.

If action is prerelease

The following steps are taken:

  • The version is parsed from version-file
  • It prerelease (-#) version (X.Y.Z-#) is appended or incremented using semver
  • The updated version and all modified files are committed (git add .)
  • A tag is pushed with the same name as the new version
  • A draft release is created with the same name with a log of history since the last release

If action is postrelease

The following steps are taken:

  • The version is parsed from the version-file
  • The Default Branch is checked out
  • The prerelease (-#) version (X.Y.Z-#) is lobbed off using semver
  • The updated version is committed
  • A tag is pushed with the same name as the new version
  • The name on the existing published release is updated to the new version

Inputs

action

Required The action to run: 'prerelease' or 'postrelease'

version-file

Required The version file to manage, e.g. 'package.json'

repo-token

Required The GitHub token for this repo

major-tag

Optional: If set, will create/overwrite a tag representing the major release ('v1'). Only applicable during during postrelease

commit-message-prefix

Optional: If set, this prefix will be added to any commit messages

release-branch

Optional: If set, set the branch that version commits will be pushed to

Outputs

This action has no outputs.

Example usage

Run a prerelease

on:
  push:
    branches: [main]
jobs:
  prerelease:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: scaffoldly/bump-version-action@main
        with:
          action: prerelease
          version-file: package.json
          repo-token: ${{ secrets.GITHUB_TOKEN }}

Run a postrelease

on:
  release:
    types: [published]
jobs:
  prerelease:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: scaffoldly/bump-version-action@main
        with:
          action: postrelease
          version-file: package.json
          repo-token: ${{ secrets.GITHUB_TOKEN }}

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.