Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed Feb 13, 2025
1 parent b19339f commit aa939a7
Showing 1 changed file with 45 additions and 40 deletions.
85 changes: 45 additions & 40 deletions .github/workflows/ci-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
arch: "x86_64"
- os: "macos-13"
arch: "arm64"

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -139,37 +140,40 @@ jobs:
name: pypi-artifacts-bdist-${{ matrix.os }}-${{ matrix.arch }}
path: ${{ github.workspace }}/wheelhouse/*.whl


build_sdist:
name: "Build sdist"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: "Building sdist"
shell: bash
run: |
pipx run build --sdist
- name: "Building sdist"
shell: bash
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts-sdist
path: ${{ github.workspace }}/dist/*.tar.gz

- uses: actions/upload-artifact@v4
with:
name: pypi-artifacts-sdist
path: ${{ github.workspace }}/dist/*.tar.gz

show-artifacts:
needs: [build_bdist, build_sdist]
name: "Show artifacts"
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true

- shell: bash
run: |
ls -l ${{ github.workspace }}/dist
- shell: bash
run: |
ls -l ${{ github.workspace }}/dist
publish-artifacts-test-pypi:
needs: [build_bdist, build_sdist]
Expand All @@ -178,18 +182,19 @@ jobs:
# upload to Test PyPI for every commit on main branch
if: github.event_name == 'push' && github.event.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
print_hash: true
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
skip_existing: true
print_hash: true


publish-artifacts-pypi:
needs: [build_bdist, build_sdist]
Expand All @@ -198,13 +203,13 @@ jobs:
# upload to PyPI for every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true
- uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true

0 comments on commit aa939a7

Please sign in to comment.