Skip to content

Fix trusted publishing #589

Fix trusted publishing

Fix trusted publishing #589

Workflow file for this run

name: Release
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
name: Release
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/human-readable
permissions:
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Set Tag env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Install UV
uses: astral-sh/setup-uv@v7
with:
version: ">=0.5.24"
- name: Install dependencies
run: |
uv sync --all-extras --frozen
- name: Build package
run: |
uv build
- name: Publish package on PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish the release notes
uses: release-drafter/release-drafter@v7
with:
tag: ${{ env.RELEASE_VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}