Files
PSO/.github/workflows/pypi.yml
jung-geun 9fd9020da2 23-09-04
pypi 패키지 배포 테스트 5
2023-09-04 15:11:51 +09:00

39 lines
922 B
YAML

name: PyPI package
on:
push:
paths:
- "setup.py"
- "pso/__init__.py"
permissions:
contents: read
packages: write
jobs:
build-linux:
runs-on: ubuntu-22.04
strategy:
max-parallel: 5
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}