diff --git a/.github/workflows/artifact.yaml b/.github/workflows/artifact.yaml index 1faf5216..484a453b 100644 --- a/.github/workflows/artifact.yaml +++ b/.github/workflows/artifact.yaml @@ -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 @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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 }} @@ -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, @@ -552,7 +551,6 @@ jobs: - uses: actions/download-artifact@v4 with: merge-multiple: true - name: python-package-distributions path: dist/ pattern: orjson_* @@ -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