diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index d5e3df5b..2fe50df9 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,16 +23,15 @@ jobs: - "3.9" - "3.8" - "3.7" - + steps: - uses: actions/checkout@v4 - + - name: Set up Python ${{ matrix.py }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.py }} - - + - name: Install dependencies run: | python3 -m pip install --upgrade pip @@ -48,8 +47,7 @@ jobs: - name: Test with tox run: | tox - - + pypi-publish: name: Upload release to PyPI needs: test @@ -76,7 +74,7 @@ jobs: - uses: actions/checkout@v4 with: fetch-depth: 0 - + - name: Set up Python 3.10 uses: actions/setup-python@v5 with: @@ -86,30 +84,35 @@ jobs: run: | python3 -m pip install --upgrade pip python3 -m pip install -r requirements/publish.txt - + - name: Configure git run: | git config --global user.name "semantic-release (via GitHub Actions)" git config --global user.email "semantic-release@gh" - + - name: semantic-release publish if master if: github.ref == 'refs/heads/release/v1' uses: relekang/python-semantic-release@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - - name: semantic-release changelog run: semantic-release changelog - + - name: build distribution run: python3 -m build - + + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Download all the dists uses: actions/download-artifact@v3 with: name: python-package-distributions path: dist/ - + - name: Publish package distributions to PyPI uses: pypa/gh-action-pypi-publish@release/v1