Skip to content

Release

Release #12

Workflow file for this run

name: Release
on:
push:
tags: ['v*']
defaults:
run:
shell: bash
jobs:
generate-wheels:
uses: ./.github/workflows/wheels.yaml
test-repository:
name: Verifies that the tests pass
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
with:
python-version: "3.11"
venv-id: "release"
poetry-dependency-install-flags: "--all-extras"
- name: Run tests
run: |
poetry run pytest -r a -v src tests --doctest-modules
draft-release:
name: Create draft release
runs-on: ubuntu-latest
needs: [ generate-wheels, test-repository ]
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Add version to environment
run: |
pipx install poetry
PROJECT_VERSION=$(poetry version --short)
echo "PROJECT_VERSION=$PROJECT_VERSION" >> $GITHUB_ENV
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
merge-multiple: true
path: dist
- name: Generate Release Notes
run: |
git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty='format:* %h %s' --no-merges >> ".github/release_template.md"
- name: Create Release Draft
uses: softprops/action-gh-release@v2
with:
body_path: ".github/release_template.md"
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
draft: true
files: |
dist/fgen_example-${{ env.PROJECT_VERSION }}-*.whl
dist/fgen_example-${{ env.PROJECT_VERSION }}.tar.gz