Skip to content

Commit

Permalink
Fix dist publish
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Nov 2, 2024
1 parent 2e3d96d commit d603dae
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- run: ./integration/run typestubs

- name: Store sdist
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_sdist
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
cp ${CARGO_TARGET_DIR}/wheels/orjson*.whl dist
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_2_17_amd64_${{ matrix.python.interpreter }}
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
cp ${CARGO_TARGET_DIR}/wheels/orjson*.whl dist
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_aarch64_${{ matrix.python.interpreter }}
Expand Down Expand Up @@ -306,7 +306,7 @@ jobs:
venv/bin/python -m pytest -v test
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_musllinux_${{ matrix.platform.arch }}_${{ matrix.python.version }}
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}

- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_manylinux_2_17_${{ matrix.target.arch }}_${{ matrix.python.version }}
Expand Down Expand Up @@ -452,7 +452,7 @@ jobs:
- run: source .venv/bin/activate && ./integration/run init

- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_universal2_aarch64_${{ matrix.python.version }}
Expand Down Expand Up @@ -522,7 +522,7 @@ jobs:
- run: source .venv/bin/activate && ./integration/run init

- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
uses: actions/upload-artifact@v4
with:
name: orjson_universal2_amd64_${{ matrix.python.version }}
Expand All @@ -533,11 +533,10 @@ jobs:
pypi:
name: PyPI
runs-on: ubuntu-24.04
if: "startsWith(github.ref, 'refs/tags/')"
# if: "startsWith(github.ref, 'refs/tags/')"
needs: [
macos_aarch64,
macos_amd64,
manylinux_aarch64,
manylinux_amd64,
manylinux_non_amd64,
musllinux,
Expand All @@ -552,7 +551,6 @@ jobs:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
name: python-package-distributions
path: dist/
pattern: orjson_*

Expand All @@ -567,7 +565,38 @@ jobs:
with:
attestations: true
packages-dir: dist
repository-url: https://github.com/ijl/orjson
skip-existing: true
user: ijl
verbose: true

pypi2:
name: PyPI
runs-on: ubuntu-24.04
# if: "startsWith(github.ref, 'refs/tags/')"
needs: [
manylinux_aarch64,
]
environment:
name: pypi
url: https://pypi.org/p/orjson
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
merge-multiple: true
path: dist/
pattern: orjson_*

- run: ls -1 dist/

- uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
packages-dir: dist
skip-existing: true
verbose: true

0 comments on commit d603dae

Please sign in to comment.