diff --git a/.github/workflows/publish-testpypi.yaml b/.github/workflows/publish-testpypi.yaml new file mode 100644 index 0000000..37e33f5 --- /dev/null +++ b/.github/workflows/publish-testpypi.yaml @@ -0,0 +1,39 @@ +name: Publish Python Packages TestPyPI + +on: + release: + types: [published] + + push: + branches: + - dev + +jobs: + testpypi-publish: + if: github.repository == 'LightwaveSmartHome/lightwave-smart' + + runs-on: ubuntu-latest + + name: Upload release to TestPyPI + environment: + name: testpypi + url: https://test.pypi.org/p/lightwave-smart + permissions: + id-token: write + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v3 + with: + python-version: '3.x' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + - name: Build package + run: python -m build + - name: Publish package distributions to TestPyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ \ No newline at end of file