diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5261e38..2e04a97 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,6 @@ name: HTTPIE_HMAC Actions -on: [push, pull_request] +on: push jobs: flake8-lint: @@ -19,11 +19,30 @@ jobs: runs-on: ubuntu-latest name: Publish steps: - - name: Install dependencies - run: pip install wheel - - name: Build package - run: python setup.py sdist bdist_wheel - - name: Publish package + - uses: actions/checkout@master + - name: Set up Python 3.10 + uses: actions/setup-python@v3 + with: + python-version: "3.10" + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + - name: Publish distribution 📦 to Test PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.TEST_PYPI_API_TOKEN }} + repository_url: https://test.pypi.org/legacy/ + - name: Publish distribution 📦 to PyPI if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: