Skip to content

release

release #15

Workflow file for this run

######################## GNU General Public License 3.0 ########################
## ##
## Copyright (C) 2023 Kevin Matthes ##
## ##
## This program is free software: you can redistribute it and/or modify ##
## it under the terms of the GNU General Public License as published by ##
## the Free Software Foundation, either version 3 of the License, or ##
## (at your option) any later version. ##
## ##
## This program is distributed in the hope that it will be useful, ##
## but WITHOUT ANY WARRANTY; without even the implied warranty of ##
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ##
## GNU General Public License for more details. ##
## ##
## You should have received a copy of the GNU General Public License ##
## along with this program. If not, see <https://www.gnu.org/licenses/>. ##
## ##
################################################################################
################################################################################
##
## AUTHOR Kevin Matthes
## BRIEF Release a new version of this project.
## COPYRIGHT GPL-3.0
## DATE 2023
## FILE release.yml
## NOTE See `LICENSE' for full license.
## See `README.md' for project details.
##
################################################################################
name: release
on:
workflow_dispatch:
inputs:
release:
description: Release type
required: true
default: patch
type: choice
options:
- major
- minor
- patch
permissions:
contents: write
pull-requests: write
jobs:
release:
name: release
runs-on: ubuntu-latest
if: contains(fromJson('["major", "minor", "patch"]'), inputs.release)
steps:
- uses: actions/checkout@v3.5.2
- uses: actions/setup-python@v4.6.1
with:
python-version: 3.11
- uses: fregante/setup-git-user@v2.0.1
- run: echo bump2version > requirements.txt
- uses: py-actions/py-dependency-install@v4.0.0
- run: |
rm requirements.txt
bump2version ${{ inputs.release }}
rustup update
cargo r -- ronlog release -i changelog.d/ \
-v "$(cargo r -- --version | cut -d\ -f2)"
git add .
git commit -m '[GitHub Actions] Assemble CHANGELOG'
- uses: peter-evans/create-pull-request@v5.0.1
with:
assignees: |
kevinmatthes
branch: documentation/release
branch-suffix: timestamp
labels: |
documentation
milestone: 5
title: '[Documentation] Release'
################################################################################