ReMe/.github/workflows/release-python.yml

50 lines
1.3 KiB
YAML

name: Release / Python packages
# GitHub Releases in this repository publish only the reme-ai Python package.
# Configure a PyPI Trusted Publisher for this repository, workflow, and its
# pypi environment before running an automatic or manual release.
on:
workflow_dispatch:
inputs:
version:
description: Release version
required: true
type: string
release:
types: [published]
permissions:
contents: read
concurrency:
group: publish-reme-ai
cancel-in-progress: false
jobs:
build:
name: Build and verify distributions
uses: ./.github/workflows/_build-python-packages.yml
with:
expected_version: ${{ github.event_name == 'release' && github.event.release.tag_name || inputs.version }}
upload_artifacts: true
publish-reme:
needs: build
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- name: Download ReMe distributions
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7
with:
name: reme-distributions
path: dist/reme
- name: Publish ReMe
uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
packages-dir: dist/reme
skip-existing: true