Coder Social home page Coder Social logo

bump2version-ci's Introduction

bump2version-ci

Repository to host automated bump2version CI to run on python repositories

This action will bump package version on merge to a specified branch using bump2version on behalf of github-actions bot. It will also automatically publish a new release on behalf of the user who created Personal Access Token

Setup

Add following workflow to your repository

name: 'Bump2version-CI'
on:
  push:
    branches:
      - 'master'
      - 'main'

jobs:
  bump-version:
    runs-on: ubuntu-latest
    name: Bump version and push tags to master
    steps:
      - name: Bump version
        uses: Clinical-Genomics/bump2version-ci@v3
        env:
          BUMPVERSION_TOKEN: ${{ secrets.BUMPVERSION_TOKEN }}
          BUMPVERSION_AUTHOR: ${{ secrets.BUMPVERSION_AUTHOR }}
          BUMPVERSION_EMAIL: ${{ secrets.BUMPVERSION_EMAIL }}
          GITHUB_REPOSITORY: ${{ github.repository }}

Add .bumpversion.cfg file to your repository

IMPORTANT!

[skip ci] tag needs to be included in bumpversion commit message, otherwise the action will keep triggering itself indefinitely!  

Example bumpversion.cfg :

[bumpversion]
current_version = 0.0.0
commit = True
tag = True
tag_name = {new_version}
message = Bump version: {current_version} โ†’ {new_version} [skip ci] 

[bumpversion:file:setup.py]
[bumpversion:file:<package>/__init__.py]

Set up Personal Access Token

  • Go to Account Settings / Developer settings / Personal access tokens and create a new PAT
  • Go to Repository Setting / Secrets and add the PAT as BUMPVERSION_TOKEN

When installed in repository

  • When pull request is ready to be merged, select "Squash and merge"
  • Using the merge commit form, add the title and issue number of the pull request.
  • Add mkdown formatted changelog as detailed commit message.
  • The commit message and formatting will be propagated towards the release.

bump2version-ci's People

Contributors

clingen-sthlm avatar eriksjolund avatar github-actions[bot] avatar henrikstranneheim avatar mayabrandi avatar mropat avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bump2version-ci's Issues

JSON body construction fails on quotes in commit message

Description

The action fails when a commit is merged with quotes. This is due to how the json body is constructed in the request.

Suggested solution

Construct the json body without evaluating the string content of the message.

This can be closed when

Commit messages containing quotes for instance does not cause the bump action to fail

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.