mirror of
https://github.com/jung-geun/PSO.git
synced 2025-12-20 04:50:45 +09:00
39 lines
922 B
YAML
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, 3.11]
|
|
|
|
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 }}
|