Skip to content

release backend

release backend #15

name: release backend
on:
workflow_dispatch:
inputs:
bump_version:
type: choice
description: "bump version"
default: minor
options:
# major version bumps do only manually
- minor
- patch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
run-checks:
uses: ./.github/workflows/code-checks.yaml
with:
branch_ref: ${{ github.ref }}
release-python:
needs: run-checks
timeout-minutes: 20
runs-on: ubuntu-22.04
environment: release
permissions:
contents: write
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup git user
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Install poetry
run: pip install poetry
- name: Prepare Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'poetry'
- name: Prepare release
run: ./bin/release-backend.sh ${{ github.event.inputs.bump_version }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ffun/dist/