|
51 | 51 | print(f"python-versions={json.dumps(versions)}") |
52 | 52 | EOF |
53 | 53 |
|
54 | | - test: |
| 54 | + test-and-build: |
55 | 55 | needs: generate-matrix |
56 | 56 | runs-on: ${{ matrix.os }} |
57 | 57 | strategy: |
@@ -99,40 +99,52 @@ jobs: |
99 | 99 | name: "${{ matrix.os }} - Python ${{ matrix.python-version }}" |
100 | 100 | token: ${{ secrets.CODECOV_TOKEN }} |
101 | 101 |
|
| 102 | + - name: Build binaries for ${{ matrix.os }}-${{ matrix.python-version }} |
| 103 | + run: | |
| 104 | + uv build |
| 105 | +
|
| 106 | + - name: Upload builds |
| 107 | + uses: actions/upload-artifact@v7 |
| 108 | + with: |
| 109 | + name: dist |
| 110 | + path: dist/ |
| 111 | + |
102 | 112 |
|
103 | 113 | testpypi-deploy: |
104 | 114 | name: Build and publish Python 🐍 distributions 📦 to TestPyPI |
| 115 | + environment: testpypi |
| 116 | + permissions: |
| 117 | + id-token: write |
105 | 118 | runs-on: ubuntu-latest |
106 | | - needs: test |
| 119 | + needs: test-and-build |
107 | 120 | steps: |
108 | 121 |
|
109 | | - - name: Checkout repository |
110 | | - uses: actions/checkout@v7 |
111 | | - |
112 | | - - name: Install uv |
113 | | - uses: astral-sh/setup-uv@v7 |
114 | | - with: |
115 | | - cache-dependency-glob: "uv.lock" |
116 | | - enable-cache: true |
117 | | - |
118 | | - - name: Install Python |
119 | | - uses: actions/setup-python@v7 |
| 122 | + - name: Download Artifacts |
| 123 | + uses: actions/download-artifact@v8 |
120 | 124 | with: |
121 | | - python-version-file: "pyproject.toml" |
| 125 | + name: dist |
| 126 | + path: dist/ |
122 | 127 |
|
123 | | - - name: Build test release 📦 |
124 | | - uses: messense/maturin-action@v1 |
125 | | - with: |
126 | | - manylinux: auto |
127 | | - command: build |
128 | | - args: --release --sdist -o dist --find-interpreter |
129 | | - |
130 | | - - name: Publish test release 📦 to Test PyPI |
131 | | - uses: messense/maturin-action@v1 |
132 | | - continue-on-error: true |
133 | | - env: |
134 | | - MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }} |
135 | | - MATURIN_REPOSITORY_URL: "https://test.pypi.org/legacy" |
| 128 | + - name: Publish to Test PyPI |
| 129 | + uses: pypa/gh-action-pypi-publish@release/v1 |
136 | 130 | with: |
137 | | - command: upload |
138 | | - args: --skip-existing * |
| 131 | + print-hash: true |
| 132 | + repository-url: https://test.pypi.org/legacy/ |
| 133 | + skip-existing: true |
| 134 | + |
| 135 | + # - name: Build test release 📦 |
| 136 | + # uses: messense/maturin-action@v1 |
| 137 | + # with: |
| 138 | + # manylinux: auto |
| 139 | + # command: build |
| 140 | + # args: --release --sdist -o dist --find-interpreter |
| 141 | + |
| 142 | + # - name: Publish test release 📦 to Test PyPI |
| 143 | + # uses: messense/maturin-action@v1 |
| 144 | + # continue-on-error: true |
| 145 | + # env: |
| 146 | + # MATURIN_PYPI_TOKEN: ${{ secrets.TEST_PYPI_PASSWORD }} |
| 147 | + # MATURIN_REPOSITORY_URL: "https://test.pypi.org/legacy" |
| 148 | + # with: |
| 149 | + # command: upload |
| 150 | + # args: --skip-existing * |
0 commit comments