Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move sdist generations to own job #155

Merged
merged 1 commit into from
Apr 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 57 additions & 39 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,6 @@ jobs:
-i python \
--release \
--out dist \
--sdist \
--target ${{ matrix.conf.target-triple }} \
--manifest-path ${{ matrix.package.dir }}/Cargo.toml $USE_BLOSC2

Expand Down Expand Up @@ -350,48 +349,67 @@ jobs:
venv/bin/python -c 'import cramjam' || venv/bin/cramjam-cli --help

- name: Upload wheels
if: startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v3
with:
name: wheels
name: dist
path: dist

pypi-publish:
name: Upload ${{ matrix.package }} release to PyPI
strategy:
fail-fast: false
matrix:
package:
- cramjam
- cramjam-cli
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [build-test]
environment:
name: pypi
url: https://pypi.org/p/${{ matrix.package }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
build-sdist:
name: Build sdists
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
name: wheels
- name: Separate packages into directories
python-version: 3.12
- name: Build sdist cramjam
run: |
ls -l

mkdir artifacts-cramjam-cli
mv cramjam_cli* artifacts-cramjam-cli/
ls -l artifacts-cramjam-cli/

mkdir artifacts-cramjam
mv cramjam* artifacts-cramjam/
ls -l artifacts-cramjam/

ls -l

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
pip install build
python -m build --sdist cramjam-python/ -o ./dist
- name: Build sdist cramjam-cli
run: python -m build --sdist cramjam-cli/ -o ./dist
- name: Upload sdists
uses: actions/upload-artifact@v3
with:
skip-existing: true
packages-dir: artifacts-${{ matrix.package }}/
name: dist
path: dist

pypi-publish:
name: Upload ${{ matrix.package }} release to PyPI
strategy:
fail-fast: false
matrix:
package:
- cramjam
- cramjam-cli
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [build-test, build-sdist]
environment:
name: pypi
url: https://pypi.org/p/${{ matrix.package }}
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v3
with:
name: dist
- name: Separate packages into directories
run: |
ls -l

mkdir artifacts-cramjam-cli
mv cramjam_cli* artifacts-cramjam-cli/
ls -l artifacts-cramjam-cli/

mkdir artifacts-cramjam
mv cramjam* artifacts-cramjam/
ls -l artifacts-cramjam/

ls -l

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: artifacts-${{ matrix.package }}/
Loading