Skip to content

Commit

Permalink
add upload-wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
1yefuwang1 committed Jul 1, 2024
1 parent 3fe35d0 commit 4404e3d
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/upload-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Upload wheels

on:
workflow_dispatch:
inputs:
pypi_test:
description: 'Upload to test.pypi.org'
required: false
default: 'true'
type: 'boolean'

jobs:
upload_wheels:
name: Upload wheels
runs-on: ubuntu-latest
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]

steps:
- uses: actions/checkout@v4

- uses: benjlevesque/[email protected]
id: short_sha

# Download artifact
- uses: actions/download-artifact@v4
with:
name: vectorlite-${{ matrix.os }}-${{ steps.short_sha.outputs.sha }}
path: ./wheelhouse

- uses: actions/setup-python@v5

- name: Install twine
run: python -m pip install twine

- name: Upload to test.pypi.org
if: ${{ github.event.inputs.pypi_test == 'true' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_TOKEN }}
run: python -m twine upload --repository testpypi wheelhouse/*.whl

- name: Upload to pypi.org
if: ${{ github.event.inputs.pypi_test == 'false' }}
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: python -m twine upload wheelhouse/*.whl

0 comments on commit 4404e3d

Please sign in to comment.