diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index ca62fed..009512f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -53,27 +53,27 @@ jobs: - name: Install dependencies run: make venv - name: flake8 - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: flake8 run: make lint-flake8 - name: mypy - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: mypy run: make lint-mypy - name: isort - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: isort run: make lint-isort - name: pytest - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: pytest run: make test-pytest - name: cram, readme - run: make readme + run: make test-cram readme - name: check-wheel run: make check-wheel @@ -121,22 +121,22 @@ jobs: - name: Install remaining dependencies run: make venv-system-site-packages - name: flake8 - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: flake8 run: make lint-flake8 - name: mypy - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: mypy run: make lint-mypy - name: isort - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: isort run: make lint-isort - name: pytest - uses: liskin/gh-problem-matcher-wrap@v2 + uses: liskin/gh-problem-matcher-wrap@v3 with: linters: pytest run: make test-pytest diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 2637999..d142e56 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -1,11 +1,16 @@ -name: Upload Python Package to PyPI +name: Build and publish Python distribution 📦 to PyPI + +# XXX: before publishing, configure PyPI +# - https://pypi.org/manage/account/publishing/ (new packages) +# - https://pypi.org/manage/project/strava-offline/settings/publishing/ (existing packages) on: release: types: [created] jobs: - pypi: + build: + name: Build distribution 📦 runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -18,9 +23,30 @@ jobs: - name: Install dependencies run: | make venv - - name: Build and publish - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + - name: Build run: | - make twine-upload + make dist + - name: Store artifacts + uses: actions/upload-artifact@v3 + with: + name: dist + path: dist/ + + pypi: + needs: + - build + name: Publish distribution 📦 to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/strava-offline + permissions: + id-token: write + steps: + - name: Fetch artifacts + uses: actions/download-artifact@v3 + with: + name: dist + path: dist/ + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@release/v1