diff --git a/.github/workflows/dev-deploy.yml b/.github/workflows/dev-deploy.yml new file mode 100644 index 000000000..bba6e2055 --- /dev/null +++ b/.github/workflows/dev-deploy.yml @@ -0,0 +1,33 @@ +name: Test Package Build and Deploy + +on: + push: + branches: + - main + +jobs: + deploy-package: + + runs-on: ubuntu-latest + if: "startsWith(github.event.head_commit.message, '[DEPLOY]')" + + steps: + + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install setuptools wheel twine + + - name: Build and publish to test index + env: + TWINE_USERNAME: ${{ secrets.DEV_PACKAGE_ID }} + TWINE_PASSWORD: ${{ secrets.DEV_PACKAGE_SECRET }} + run: | + python setup.py sdist bdist_wheel + twine upload --repository testpypi dist/*