From ddd400ed2430650505ce2616dc4e635eb2df2fcb Mon Sep 17 00:00:00 2001 From: Onuralp SEZER Date: Wed, 30 Aug 2023 18:42:31 +0300 Subject: [PATCH] =?UTF-8?q?ci(pypi):=20=F0=9F=9A=A7=20test(a,b,rc)=20relea?= =?UTF-8?q?se=20to=20pypi=20github=20action=20added=20(#311)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ci(pypi): 🚧 test(a,b,rc) release to pypi github action added Signed-off-by: Onuralp SEZER * ci: 🚧 pypi_test_username added Signed-off-by: Onuralp SEZER * chore: 🔥 v letter removed from tag for consistency to old tags Signed-off-by: Onuralp SEZER --------- Signed-off-by: Onuralp SEZER --- .github/workflows/publish-test.yml | 44 ++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-test.yml diff --git a/.github/workflows/publish-test.yml b/.github/workflows/publish-test.yml new file mode 100644 index 00000000..1a33b67b --- /dev/null +++ b/.github/workflows/publish-test.yml @@ -0,0 +1,44 @@ +name: Supervision Test Releases to PyPi +on: + push: + branches: + - main + - develop + tags: + - '[0-9]+.[0-9]+[0-9]+.[0-9]+a[0-9]' + - '[0-9]+.[0-9]+[0-9]+.[0-9]+b[0-9]' + - '[0-9]+.[0-9]+[0-9]+.[0-9]+rc[0-9]' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build-n-publish: + name: Build and publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout source + uses: actions/checkout@v3 + + - name: 🐍 Set up Python 3.8 environment for build + uses: actions/setup-python@v4 + with: + python-version: "3.8" + + - name: 🏗️ Build source and wheel distributions + run: | + python -m pip install --upgrade build twine + python -m build + twine check --strict dist/* + - name: 🚀 Publish distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} + - name: 🚀 Publish to Test-PyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ + user: ${{ secrets.PYPI_TEST_USERNAME }} + password: ${{ secrets.PYPI_TEST_PASSWORD }}