From f2dd5862e26af5e59b29ef3c8284384ed6916d42 Mon Sep 17 00:00:00 2001 From: krateng Date: Fri, 24 Dec 2021 07:15:59 +0100 Subject: [PATCH] Added workflow for library package --- .github/workflows/pypi.yml | 2 +- .github/workflows/pypi_lib.yml | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/pypi_lib.yml diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index fc9775b..67fd36a 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -19,7 +19,7 @@ jobs: python-version: '3.x' - name: Install dependencies - run: pip install build doreah + run: pip install build - name: Build package run: python -m build diff --git a/.github/workflows/pypi_lib.yml b/.github/workflows/pypi_lib.yml new file mode 100644 index 0000000..0413385 --- /dev/null +++ b/.github/workflows/pypi_lib.yml @@ -0,0 +1,36 @@ +name: Publish library to PyPI + +on: + push: + paths: + - 'auxiliary/malojalib/pyproject.toml' + # When the version updates, this file changes + # False positives only result in a failed push + +jobs: + publish_to_pypi: + name: Push Library to PyPI + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: pip install build + + - name: Change directory + run: cd auxiliary/malojalib + + - name: Build package + run: python -m build + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }}