Skip to content

pyautoenv release

pyautoenv release #15

Workflow file for this run

name: pyautoenv release
on:
workflow_dispatch:
inputs:
version:
type: string
description: New version e.g., 3.1.4
required: true
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Validate Version
run: |
python -m pip install toml
poetry_version="$(python -c 'import toml; print(toml.load("pyproject.toml")["tool"]["poetry"]["version"])')"
echo "Version from input: ${{ github.event.inputs.version }}"
echo "Version from poetry: ${poetry_version}"
if ! [ "${{ github.event.inputs.version }}" = "${poetry_version}" ]; then
exit 1;
fi
script_version="$(python -c 'import pyautoenv; print(pyautoenv.__version__)')"
echo "Version from script: ${script_version}"
if ! [ "${poetry_version}" = "${script_version}" ]; then
exit 1;
fi
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create "v${{ github.event.inputs.version }}" \
--target main \
--generate-notes \
--draft