Bump Version - graylog 6.0.0-beta.5-1 (branch: 6.0) #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Bump Version" | |
run-name: "Bump Version - ${{ inputs.product }} ${{ inputs.version }} (branch: ${{ inputs.branch }})" | |
on: | |
workflow_dispatch: | |
inputs: | |
branch: | |
description: "The branch to check out" | |
required: true | |
version: | |
description: "The new version and revision. (Example: \"6.0.0-beta.1-1\")" | |
required: true | |
product: | |
description: "The product to bump" | |
required: true | |
type: "choice" | |
default: "graylog" | |
options: | |
- "graylog" | |
- "forwarder" | |
defaults: | |
run: | |
shell: "bash" | |
jobs: | |
bump: | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout ${{ inputs.branch }}" | |
uses: "actions/checkout@v4" | |
with: | |
ref: "${{ inputs.branch }}" | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: "Install dependencies" | |
run: "pip3 install -r requirements.txt" | |
- name: "Bump version to ${{ inputs.version }}" | |
run: "./release.py --bump ${{ inputs.product }} --version ${{ inputs.version }}" | |
- name: "Generate README" | |
run: "./release.py --generate-readme" | |
- name: "Commit and push" | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add version.yml README.md | |
git commit -m "Bump to ${{ inputs.version }}" | |
git tag -m "Tag ${{ inputs.version }}" "${{ inputs.version }}" | |
git push origin "${{ inputs.branch }}" | |
git push --tags |