Skip to content

Tag and Release

Tag and Release #27

name: Tag and Release
on:
workflow_dispatch:
inputs:
bump:
type: choice
description: Version bump to perform
required: true
options:
- "patch"
- "minor"
- "major"
jobs:
tag:
name: Version Tag
runs-on: ubuntu-latest
permissions:
contents: write
outputs:
new_tag: ${{ steps.tag.outputs.new_tag }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Bump version and push tag
uses: anothrNick/github-tag-action@v1
id: tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DEFAULT_BUMP: ${{ github.event.inputs.bump }}
WITH_V: true
BRANCH_HISTORY: last
release:
needs: [tag]
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Release with latest tag
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.tag.outputs.new_tag }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}