diff --git a/.github/workflows/check.yml b/.github/workflows/check.yaml similarity index 100% rename from .github/workflows/check.yml rename to .github/workflows/check.yaml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yaml similarity index 57% rename from .github/workflows/release.yml rename to .github/workflows/release.yaml index 298e189..c17788c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yaml @@ -3,14 +3,12 @@ on: push: tags: ["*"] +env: + dists-artifact-name: python-package-distributions + jobs: - release: + build: runs-on: ubuntu-latest - environment: - name: release - url: https://pypi.org/p/platformdirs - permissions: - id-token: write steps: - uses: actions/checkout@v4 with: @@ -23,6 +21,27 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} - name: Build package run: uv build --python 3.13 --python-preference only-managed --sdist --wheel . --out-dir dist + - name: Store the distribution packages + uses: actions/upload-artifact@v4 + with: + name: ${{ env.dists-artifact-name }} + path: dist/* + + release: + needs: + - build + runs-on: ubuntu-latest + environment: + name: release + url: https://pypi.org/project/platformdirs/${{ github.ref_name }} + permissions: + id-token: write + steps: + - name: Download all the dists + uses: actions/download-artifact@v4 + with: + name: ${{ env.dists-artifact-name }} + path: dist/ - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@v1.10.1 with: