mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 06:14:29 +00:00
51 lines
976 B
YAML
51 lines
976 B
YAML
name: Publish to PyPI
|
|
|
|
on:
|
|
push:
|
|
branches: [master]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v6.0.2
|
|
|
|
- uses: actions/setup-python@v6.2.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v7.5.0
|
|
|
|
- name: Build distribution
|
|
run: uv build
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: dist
|
|
path: dist/*
|
|
|
|
publish:
|
|
name: Publish
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
environment:
|
|
name: pypi
|
|
url: https://pypi.org/project/pyfragment/
|
|
permissions:
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v8.0.1
|
|
with:
|
|
name: dist
|
|
path: dist
|
|
|
|
- name: Publish to PyPI
|
|
uses: pypa/gh-action-pypi-publish@v1.13.0
|