-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to bump versions in version.yml
- Loading branch information
Showing
2 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
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 |
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