Automatic release #121
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: Automatic release | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: "Version of the new release (e.g. `0.0.1`)" | |
required: true | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
env: | |
VERSION: ${{ github.event.inputs.version }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.NORMANRZ_PAT }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
architecture: 'x64' | |
- name: Setup git config | |
run: | | |
git config user.name "Automatic release" | |
git config user.email "<>" | |
- name: Check whether tag already exists | |
run: | | |
if git show-ref --tags "v${VERSION}" --quiet; then | |
echo "Version $VERSION already exists. Stopping." | |
exit 1 | |
fi | |
- name: Make and push release | |
run: | | |
_tooling/make_release.sh ${VERSION} | |
git add */Changelog.md | |
git commit -m "Release for v${VERSION}" | |
git tag v${VERSION} | |
git push origin master | |
git push --tags |