diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml new file mode 100644 index 0000000..ec5c304 --- /dev/null +++ b/.github/workflows/pypi.yml @@ -0,0 +1,37 @@ +name: PYPI Publish + +on: + pull_request: + push: + branches: + - "master" + tags: + - "[0-9]+.[0-9]+.[0-9]+" + +jobs: + pre-commit: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.11" + - uses: pre-commit/action@v2.0.0 + deploy: + runs-on: ubuntu-latest + needs: + - pre-commit + # - tests TODO + if: startsWith(github.ref, 'refs/tags') + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + - name: Install pypa/build + run: python -m pip install build + - name: Build a binary wheel and a source tarball + run: python -m build --sdist --wheel --outdir dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + user: __token__ + password: ${{ secrets.pypi_token }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 19cee25..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: python -python: - - "3.8" -script: -- echo "no tests" -deploy: - provider: pypi - skip_existing: true - user: simahawk - password: $PYPI_PASSWORD - distributions: sdist bdist_wheel - on: - repo: camptocamp/pytest-odoo - branch: master - tags: true