|
4 | 4 | tags:
|
5 | 5 | - '*.*.*'
|
6 | 6 | jobs:
|
7 |
| - build-and-publish: |
8 |
| - name: Build and publish Miniflux's Python package |
| 7 | + build: |
| 8 | + name: Build distribution 📦 |
9 | 9 | runs-on: ubuntu-latest
|
| 10 | + |
10 | 11 | steps:
|
11 |
| - - uses: actions/checkout@v4 |
12 |
| - - uses: actions/setup-python@v5 |
13 |
| - with: |
14 |
| - python-version: '3.x' |
15 |
| - - name: Install pypa/build |
16 |
| - run: >- |
17 |
| - python -m pip install build --user |
18 |
| - - name: Build a binary wheel and a source tarball |
19 |
| - run: >- |
20 |
| - python -m build --sdist --wheel --outdir dist/ . |
21 |
| - - name: Publish to PyPI |
22 |
| - uses: pypa/gh-action-pypi-publish@release/v1 |
23 |
| - with: |
24 |
| - password: ${{ secrets.PYPI_API_TOKEN }} |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - name: Set up Python |
| 14 | + uses: actions/setup-python@v5 |
| 15 | + with: |
| 16 | + python-version: "3.x" |
| 17 | + - name: Install pypa/build |
| 18 | + run: >- |
| 19 | + python3 -m |
| 20 | + pip install |
| 21 | + build |
| 22 | + --user |
| 23 | + - name: Build a binary wheel and a source tarball |
| 24 | + run: python3 -m build |
| 25 | + - name: Store the distribution packages |
| 26 | + uses: actions/upload-artifact@v4 |
| 27 | + with: |
| 28 | + name: python-package-distributions |
| 29 | + path: dist/ |
| 30 | + |
| 31 | + publish-to-pypi: |
| 32 | + name: >- |
| 33 | + Publish Python 🐍 distribution 📦 to PyPI |
| 34 | + if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes |
| 35 | + needs: |
| 36 | + - build |
| 37 | + runs-on: ubuntu-latest |
| 38 | + environment: |
| 39 | + name: pypi |
| 40 | + url: https://pypi.org/p/miniflux |
| 41 | + permissions: |
| 42 | + id-token: write # IMPORTANT: mandatory for trusted publishing |
| 43 | + |
| 44 | + steps: |
| 45 | + - name: Download all the dists |
| 46 | + uses: actions/download-artifact@v4 |
| 47 | + with: |
| 48 | + name: python-package-distributions |
| 49 | + path: dist/ |
| 50 | + - name: Publish distribution 📦 to PyPI |
| 51 | + uses: pypa/gh-action-pypi-publish@release/v1 |
0 commit comments