Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Publish to PyPI

on:
push:
tags:
- "v*.*.*" # trigger on version tags: v1.0.0, v1.2.3, …

jobs:
pypi-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/batch-img
permissions:
id-token: write # Mandatory for PyPI trusted publishing
contents: read

steps:
- name: Checkout repo
uses: actions/checkout@v5

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"

- name: Install build tools
run: python3 -m pip install --upgrade pip hatchling twine build

- name: Build source and wheel dist
# Uses hatchling as defined in pyproject.toml
run: python3 -m build

- name: Validate dist files
run: twine check dist/*

- name: Publish dist to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
35 changes: 0 additions & 35 deletions release.yml

This file was deleted.