Add separate jobs for test-pypi and pypi in github actions
This commit is contained in:
parent
cc591a634a
commit
0f1fce4a7b
39
.github/workflows/github-actions.yml
vendored
39
.github/workflows/github-actions.yml
vendored
@ -35,6 +35,8 @@ jobs:
|
||||
- run: pre-commit run -a
|
||||
|
||||
test:
|
||||
# Test suite run against recent python versions
|
||||
# and against a few combination of MongoDB and pymongo
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -75,6 +77,7 @@ jobs:
|
||||
|
||||
build_doc_dryrun:
|
||||
# ensures that readthedocs can be built continuously
|
||||
# to avoid that it breaks when new releases are being created
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
@ -103,6 +106,26 @@ jobs:
|
||||
message: |
|
||||
Build ${{ job.status }} - ${{ github.actor }} ${{ github.event_name }} ${{ github.event.ref }}
|
||||
|
||||
build-n-publish-dummy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [linting, test]
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Set up Python 3.7
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: build dummy wheel for test-pypi
|
||||
run: |
|
||||
pip install wheel
|
||||
python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
|
||||
- name: publish test-pypi
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
with:
|
||||
password: ${{ secrets.test_pypi_token }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
|
||||
build-n-publish:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [linting, test]
|
||||
@ -117,17 +140,9 @@ jobs:
|
||||
- name: build dummy wheel for test-pypi
|
||||
run: |
|
||||
pip install wheel
|
||||
python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
|
||||
# python setup.py sdist bdist_wheel
|
||||
- name: publish test-pypi
|
||||
if: github.event_name != 'pull_request'
|
||||
python setup.py sdist bdist_wheel
|
||||
- name: publish pypi
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||
with:
|
||||
password: ${{ secrets.test_pypi_token }}
|
||||
repository_url: https://test.pypi.org/legacy/
|
||||
## Must clean prev files and rebuild here
|
||||
# - name: publish pypi
|
||||
# uses: pypa/gh-action-pypi-publish@master
|
||||
# if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||
# with:
|
||||
# password: ${{ secrets.pypi_token }}
|
||||
password: ${{ secrets.pypi_token }}
|
Loading…
x
Reference in New Issue
Block a user