1
0
pl-build/.github/workflows/deploy.yml
Jonathan Hoffstadt 52aab4afae
Some checks are pending
Deploy Tools / build-package (3.9) (push) Waiting to run
initial commit
2024-09-05 12:05:49 -05:00

63 lines
1.6 KiB
YAML

name: Deploy Tools
on:
push:
branches:
- master
jobs:
build-package:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ 3.9 ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip setuptools wheel build
- name: Build package
shell: cmd
run: |
cd %GITHUB_WORKSPACE%
echo [build-system] >> pyproject.toml
echo requires = ["setuptools", "wheel"] >> pyproject.toml
echo build-backend = "setuptools.build_meta" >> pyproject.toml
python3 -m build
- uses: actions/upload-artifact@v4
with:
name: pltools wheel
path: |
${{ github.workspace }}/version_number.txt
${{ github.workspace }}/dist/*.whl
${{ github.workspace }}/dist/*.tar.gz
retention-days: 1
if-no-files-found: error
- name: PyPi Deployment
shell: cmd
if: ${contains(github.event.head_commit.message, '[pypi]')}
run: |
python3 -m pip install twine
python3 -m twine upload dist/* -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} --skip-existing
- name: Test PyPi Deployment
shell: cmd
if: ${contains(github.event.head_commit.message, '[testpypi]')}
run: |
python3 -m pip install twine
python3 -m twine upload --repository testpypi dist/* -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }} --skip-existing