This repo contains a action to get repo's branch name:
based on [How to get the current branch within Github Actions?https://stackoverflow.com/questions/58033366/how-to-get-the-current-branch-within-github-actions]:()
outputs:
branch-name:
description: "Branch name"
value: ${{ steps.branch-name-extractor.outputs.branch-name }}
name: GitHub Composite Action to extract the Branch Name
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- id: get-branch-name
uses: makramjandar/action-branch-name@v1
- run: echo ${{ steps.get-branch-name.outputs.branch-name }}
You can bump version on merging Pull Requests with specific labels (bump:major,bump:minor,bump:patch). Pushing tag manually by yourself also work.
This action updates major/minor release tags on a tag push. e.g. Update v1 and v1.2 tag when released v1.2.3. ref: https://help.github.com/en/articles/about-actions#versioning-your-action