mirror of
https://github.com/Smart123s/ItchClaim.git
synced 2025-07-26 15:37:28 +02:00
38 lines
888 B
YAML
38 lines
888 B
YAML
# Based on https://www.caktusgroup.com/blog/2021/02/11/automating-pypi-releases/
|
|
|
|
name: PyPI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
tags:
|
|
- 'v*'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
- name: Install build dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install build twine
|
|
- name: Build package
|
|
run: python -m build
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ItchClaim-${{ github.sha }}-py3-none-any-whl
|
|
path: dist/*.whl
|
|
- name: Push package
|
|
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
|
|
env:
|
|
TWINE_USERNAME: __token__
|
|
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
|
run: python3 -m twine upload dist/*
|