diff --git a/.github/workflows/push-to-registry.yaml b/.github/workflows/push-to-registry.yaml new file mode 100644 index 0000000..510357f --- /dev/null +++ b/.github/workflows/push-to-registry.yaml @@ -0,0 +1,34 @@ +name: Publish to GitLab PyPI + +on: + push: + branches: + - master + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout Code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.10.12' + + - name: Install Build Dependencies + run: | + python -m pip install --upgrade pip + pip install build twine + + - name: Build the Package + run: python -m build + + - name: Publish to GitLab PyPI + env: + TWINE_USERNAME: ${{ secrets.GITLAB_USERNAME }} + TWINE_PASSWORD: ${{ secrets.GITLAB_TOKEN }} + run: | + python -m twine upload --repository-url ${{ secrets.GITLAB_REPOSITORY_URL }} dist/*