Skip to content

Commit e139432

Browse files
committed
actions suck
1 parent 6754b7b commit e139432

File tree

1 file changed

+8
-184
lines changed

1 file changed

+8
-184
lines changed

.github/workflows/publish-py.yaml

Lines changed: 8 additions & 184 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: publish
33
on:
44
push:
55
tags:
6-
- 'v*'
6+
- 'NO_OPT*'
77
workflow_dispatch:
88
inputs:
99
os:
@@ -99,6 +99,7 @@ jobs:
9999
set -e
100100
uv python install "${{ matrix.py }}" || true
101101
uv python list --only-installed
102+
102103
- name: Select interpreter and flags
103104
id: envsel
104105
if: ${{ env.MATCH }}
@@ -107,20 +108,24 @@ jobs:
107108
set -e
108109
109110
PY_TAG="${{ matrix.py }}"
111+
110112
if [[ "$PY_TAG" == *t* ]]; then
111113
PY="$(uv python find "$PY_TAG" 2>/dev/null || true)"
112114
FLAGS=""
113115
else
114116
PY="$(which python)"
115117
FLAGS=""
116118
fi
119+
117120
if [[ -z "$PY" ]]; then
118121
echo "skip=1" >> $GITHUB_OUTPUT
119122
exit 0
120123
fi
124+
121125
echo "skip=0" >> $GITHUB_OUTPUT
122126
echo "py=$PY" >> $GITHUB_OUTPUT
123127
echo "flags=$FLAGS" >> $GITHUB_OUTPUT
128+
124129
- name: Build wheel (Linux)
125130
if: ${{ env.MATCH == 'true' && runner.os == 'Linux' && steps.envsel.outputs.skip == '0' }}
126131
uses: PyO3/maturin-action@v1
@@ -150,6 +155,7 @@ jobs:
150155
-m py-radiate/Cargo.toml
151156
-o dist
152157
${{ steps.envsel.outputs.flags }}
158+
153159
- uses: actions/upload-artifact@v4
154160
if: always()
155161
with:
@@ -172,186 +178,4 @@ jobs:
172178
uses: pypa/gh-action-pypi-publish@release/v1
173179
with:
174180
verbose: true
175-
skip-existing: true
176-
177-
# name: publish
178-
179-
# on:
180-
# push:
181-
# tags:
182-
# - 'NO_OPT*'
183-
# workflow_dispatch:
184-
# inputs:
185-
# os:
186-
# description: "Limit to one OS (ubuntu-latest|macos-13|macos-15|windows-latest)"
187-
# required: false
188-
# default: ""
189-
# arch:
190-
# description: "Limit to one arch (x86_64|aarch64|arm64|x64)"
191-
# required: false
192-
# default: ""
193-
# py:
194-
# description: "Limit to one Python (e.g. 3.12 or 3.13t)"
195-
# required: false
196-
# default: ""
197-
198-
# permissions:
199-
# contents: read
200-
# id-token: write
201-
202-
# env:
203-
# CARGO_INCREMENTAL: 0
204-
# CARGO_NET_RETRY: 10
205-
# RUSTUP_MAX_RETRIES: 10
206-
207-
# jobs:
208-
# sdist:
209-
# runs-on: ubuntu-latest
210-
# steps:
211-
# - uses: actions/checkout@v4
212-
# - uses: actions/setup-python@v5
213-
# with: { python-version: '3.12' }
214-
# - uses: astral-sh/setup-uv@v6
215-
# - name: Build sdist
216-
# run: |
217-
# cd py-radiate
218-
# uvx maturin sdist -o target-sdist
219-
# - uses: actions/upload-artifact@v4
220-
# with:
221-
# name: sdist
222-
# path: py-radiate/target-sdist/*.tar.gz
223-
224-
# wheels:
225-
# continue-on-error: true
226-
# name: >-
227-
# ${{ matrix.os }} • ${{ matrix.arch }} •
228-
# ${{ contains(matrix.py, 't') && 'nogil' || 'gil' }}
229-
# runs-on: ${{ matrix.os }}
230-
# strategy:
231-
# fail-fast: false
232-
# matrix:
233-
# include:
234-
# # Linux
235-
# - { os: ubuntu-latest, arch: x86_64, py: '3.12' }
236-
# - { os: ubuntu-latest, arch: aarch64, py: '3.12', target: aarch64-unknown-linux-gnu }
237-
# - { os: ubuntu-latest, arch: x86_64, py: '3.13t' }
238-
# - { os: ubuntu-latest, arch: aarch64, py: '3.13t', target: aarch64-unknown-linux-gnu }
239-
240-
# # macOS
241-
# - { os: macos-13, arch: x86_64, py: '3.12' }
242-
# - { os: macos-15, arch: arm64, py: '3.12' }
243-
# - { os: macos-13, arch: x86_64, py: '3.13t' }
244-
# - { os: macos-15, arch: arm64, py: '3.13t' }
245-
246-
# # Windows
247-
# - { os: windows-latest, arch: x64, py: '3.12' }
248-
# - { os: windows-latest, arch: x64, py: '3.13t' }
249-
250-
# env:
251-
# MATCH: ${{ github.event_name != 'workflow_dispatch' || (
252-
# (inputs.os == '' || matrix.os == inputs.os) &&
253-
# (inputs.arch == '' || matrix.arch == inputs.arch) &&
254-
# (inputs.py == '' || matrix.py == inputs.py)
255-
# ) }}
256-
257-
# steps:
258-
# - uses: actions/checkout@v4
259-
# if: ${{ env.MATCH }}
260-
261-
# - uses: dtolnay/rust-toolchain@stable
262-
# if: ${{ env.MATCH }}
263-
264-
# - uses: actions/setup-python@v5
265-
# if: ${{ env.MATCH }}
266-
# with: { python-version: '3.12' }
267-
268-
# - uses: astral-sh/setup-uv@v6
269-
# if: ${{ env.MATCH }}
270-
271-
# - name: Ensure requested interpreter (best effort)
272-
# if: ${{ env.MATCH }}
273-
# shell: bash
274-
# run: |
275-
# set -e
276-
# uv python install "${{ matrix.py }}" || true
277-
# uv python list --only-installed
278-
279-
# - name: Select interpreter and flags
280-
# id: envsel
281-
# if: ${{ env.MATCH }}
282-
# shell: bash
283-
# run: |
284-
# set -e
285-
286-
# PY_TAG="${{ matrix.py }}"
287-
288-
# if [[ "$PY_TAG" == *t* ]]; then
289-
# PY="$(uv python find "$PY_TAG" 2>/dev/null || true)"
290-
# FLAGS=""
291-
# else
292-
# PY="$(which python)"
293-
# FLAGS=""
294-
# fi
295-
296-
# if [[ -z "$PY" ]]; then
297-
# echo "skip=1" >> $GITHUB_OUTPUT
298-
# exit 0
299-
# fi
300-
301-
# echo "skip=0" >> $GITHUB_OUTPUT
302-
# echo "py=$PY" >> $GITHUB_OUTPUT
303-
# echo "flags=$FLAGS" >> $GITHUB_OUTPUT
304-
305-
# - name: Build wheel (Linux)
306-
# if: ${{ env.MATCH == 'true' && runner.os == 'Linux' && steps.envsel.outputs.skip == '0' }}
307-
# uses: PyO3/maturin-action@v1
308-
# env:
309-
# PYO3_PYTHON: ${{ steps.envsel.outputs.py }}
310-
# with:
311-
# maturin-version: '1.9.4'
312-
# command: build
313-
# args: >
314-
# --release
315-
# -m py-radiate/Cargo.toml
316-
# -o dist
317-
# ${{ steps.envsel.outputs.flags }}
318-
# ${{ matrix.target && format('--target {0}', matrix.target) || '' }}
319-
# manylinux: auto
320-
321-
# - name: Build wheel (macOS/Windows)
322-
# if: ${{ env.MATCH == 'true' && runner.os != 'Linux' && steps.envsel.outputs.skip == '0' }}
323-
# uses: PyO3/maturin-action@v1
324-
# env:
325-
# PYO3_PYTHON: ${{ steps.envsel.outputs.py }}
326-
# with:
327-
# maturin-version: '1.9.4'
328-
# command: build
329-
# args: >
330-
# --release
331-
# -m py-radiate/Cargo.toml
332-
# -o dist
333-
# ${{ steps.envsel.outputs.flags }}
334-
335-
# - uses: actions/upload-artifact@v4
336-
# if: always()
337-
# with:
338-
# name: wheels-${{ matrix.os }}-${{ matrix.arch }}-${{ contains(matrix.py, 't') && 'nogil' || 'gil' }}
339-
# path: dist/*.whl
340-
341-
# publish:
342-
# needs: [ sdist, wheels ]
343-
# runs-on: ubuntu-latest
344-
# if: ${{ needs.sdist.result == 'success' }}
345-
# environment:
346-
# name: publish_pypi
347-
# steps:
348-
# - uses: actions/download-artifact@v4
349-
# with:
350-
# path: dist
351-
# merge-multiple: true
352-
# - run: ls -R dist
353-
# - name: Publish (Trusted Publisher)
354-
# uses: pypa/gh-action-pypi-publish@release/v1
355-
# with:
356-
# verbose: true
357-
# skip-existing: true
181+
skip-existing: true

0 commit comments

Comments
 (0)