Files
aqtinstall/.github/workflows/publish-to-pypi.yml
xavier2k6 44393832f3
Some checks failed
Check tox tests / Check packaging 📦 (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Publish Python 🐍 distributions 📦 to PyPI / Build package (push) Has been cancelled
Test on GH actions environment / test (binary, windows-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.8.0) (push) Has been cancelled
Test on GH actions environment / test (standard, ubuntu-latest, 3.13, 6.8.1) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.5.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.6.3) (push) Has been cancelled
Test on GH actions environment / test (standard, windows-latest, 3.13, 6.7.3) (push) Has been cancelled
Publish Python 🐍 distributions 📦 to PyPI / publish Python 🐍 distributions 📦 to PyPI (push) Has been cancelled
Explicitly use python 3.13 (#891)
Co-authored-by: Hiroshi Miura <miurahr@linux.com>
2025-03-16 22:05:41 +09:00

60 lines
1.7 KiB
YAML

name: Publish Python 🐍 distributions 📦 to PyPI
on:
push:
branches:
- master
- releases/*
- rel-*
tags:
- v*
jobs:
build:
name: Build package
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
fetch-depth: 50
- name: Fetch release tag
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- name: Set up Python 3.13🐍
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install build and twine
run: python -m pip install build twine --user
- name: Build release assets
run: python -m build ./
- name: twine check
run: python -m twine check dist/*
- name: upload dist artifacts
uses: actions/upload-artifact@v4
with:
name: dists
path: dist/
publish:
name: publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-22.04
needs: build
permissions:
id-token: write
steps:
- name: download dist artifacts
uses: actions/download-artifact@v4
with:
name: dists
path: dist/
- name: Publish distribution 📦 to Test PyPI when releases branch
if: ${{ startsWith(github.event.ref, 'refs/heads/releases') }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.testpypi_password }}
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution 📦 to PyPI
if: ${{ startsWith(github.event.ref, 'refs/tags') }}
uses: pypa/gh-action-pypi-publish@release/v1