Giter VIP home page Giter VIP logo

action-bumpr's Introduction

action-bumpr

action-bumpr bumps semantic version tag on merging Pull Requests with specific lables (bump:major,bump:minor,bump:patch).

action-bumpr image

Test reviewdog release GitHub release (latest SemVer) action-bumpr supported

example

Input

inputs:
  default_bump_level:
    description: "Default bump level if labels are not attached [major,minor,patch]. Do nothing if it's empty"
    required: false
  dry_run:
    description: "Do not actually tag next version if it's true"
    required: false
  github_token:
    description: 'GITHUB_TOKEN to list pull requests and create tags'
    default: '${{ github.token }}'
    required: true
  tag_as_user:
    description: "Name to use when creating tags"
    required: false
  tag_as_email:
    description: "Email address to use when creating tags"
    required: false
outputs:
  current_version:
    description: "current version"
  next_version:
    description: "next version"
  skip:
    description: "True if release is skipped. e.g. No labels attached to PR."
  message:
    description: "Tag message"

Usage

Simple

name: release
on:
  push:
    branches:
      - master
  pull_request:
    types:
      - labeled

jobs:
  release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Bump version on merging Pull Requests with specific labels.
      # (bump:major,bump:minor,bump:patch)
      - uses: haya14busa/action-bumpr@v1

Integrate with other release related actions.

Integrate with haya14busa/action-update-semver to update major and minor tags on semantic version tag release (e.g. update v1 and v1.2 tag on v1.2.3 release).

name: release
on:
  push:
    branches:
      - master
    tags:
      - 'v*.*.*'
  pull_request:
    types:
      - labeled

jobs:
  release:
    if: github.event.action != 'labeled'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      # Bump version on merging Pull Requests with specific labels.
      # (bump:major,bump:minor,bump:patch)
      - id: bumpr
        if: "!startsWith(github.ref, 'refs/tags/')"
        uses: haya14busa/action-bumpr@v1

      # Update corresponding major and minor tag.
      # e.g. Update v1 and v1.2 when releasing v1.2.3
      - uses: haya14busa/action-update-semver@v1
        if: "!steps.bumpr.outputs.skip"
        with:
          github_token: ${{ secrets.github_token }}
          tag: ${{ steps.bumpr.outputs.next_version }}
  release-check:
    if: github.event.action == 'labeled'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Post bumpr status comment
        uses: haya14busa/action-bumpr@v1

Badge

[![action-bumpr supported](https://img.shields.io/badge/bumpr-supported-ff69b4?logo=github&link=https://github.com/haya14busa/action-bumpr)](https://github.com/haya14busa/action-bumpr)

Note

action-bumpr uses push on master event to run workflow instead of pull_request closed (merged) event because github token doesn't have write permission for pull_request from fork repository.

action-bumpr's People

Contributors

github-actions[bot] avatar haya14busa avatar j-crowe avatar jordemort avatar meroje avatar ozw-sei avatar pr1ntr avatar rickstaa avatar shogo82148 avatar

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.