Some checks failed
Deploy Tools / build-package (push) Failing after 15s
55 lines
1.4 KiB
YAML
55 lines
1.4 KiB
YAML
name: Deploy Tools
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build-package:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python3 -m pip install --upgrade pip setuptools wheel build
|
|
|
|
- name: Build package
|
|
run: |
|
|
cd $GITHUB_WORKSPACE
|
|
echo [build-system] >> pyproject.toml
|
|
echo requires = ["setuptools", "wheel"] >> pyproject.toml
|
|
echo build-backend = "setuptools.build_meta" >> pyproject.toml
|
|
cat 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 |