Improve workflow
This commit is contained in:
parent
b3d4ebd1a0
commit
3278445fc0
1 changed files with 9 additions and 34 deletions
43
.github/workflows/pythonpackage.yml
vendored
43
.github/workflows/pythonpackage.yml
vendored
|
|
@ -47,36 +47,17 @@ jobs:
|
||||||
- name: Build sdist
|
- name: Build sdist
|
||||||
run: pipx run build --sdist
|
run: pipx run build --sdist
|
||||||
|
|
||||||
|
- name: Test sdist
|
||||||
|
run: |
|
||||||
|
python -m pip install dist/sqlcipher3-wheels-*.tar.gz
|
||||||
|
mv sqlcipher3 sqlcipher3_
|
||||||
|
python -m test
|
||||||
|
mv sqlcipher3_ sqlcipher3
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: sdist
|
|
||||||
path: dist/sqlcipher3-wheels-*.tar.gz
|
path: dist/sqlcipher3-wheels-*.tar.gz
|
||||||
|
|
||||||
test-sdist:
|
|
||||||
needs: build-sdist
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Fetch source distribution
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: sdist
|
|
||||||
path: dist/
|
|
||||||
|
|
||||||
- uses: actions/setup-python@v4
|
|
||||||
with:
|
|
||||||
python-version: 3.8
|
|
||||||
|
|
||||||
- name: Install the package
|
|
||||||
run: |
|
|
||||||
python -m pip install dist/sqlcipher3-wheels-*.tar.gz
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: |
|
|
||||||
mv sqlcipher3 sqlcipher3_
|
|
||||||
python -m test
|
|
||||||
mv sqlcipher3_ sqlcipher3
|
|
||||||
|
|
||||||
build-wheels:
|
build-wheels:
|
||||||
needs: prepare-sqlite
|
needs: prepare-sqlite
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
@ -183,22 +164,16 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: wheels
|
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
upload-pypi:
|
upload-pypi:
|
||||||
needs: [build-wheels, test-sdist]
|
needs: [build-wheels, build-sdist]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: sdist
|
name: artifact
|
||||||
path: dist
|
|
||||||
|
|
||||||
- uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: wheels
|
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
- uses: pypa/gh-action-pypi-publish@release/v1
|
- uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue