move condition of build-n-publish to job level + disable test-pypi
releasing as there is some limitation on the size
This commit is contained in:
parent
81197d6061
commit
49e33b978d
19
.github/workflows/github-actions.yml
vendored
19
.github/workflows/github-actions.yml
vendored
@ -115,20 +115,24 @@ jobs:
|
|||||||
uses: actions/setup-python@v1
|
uses: actions/setup-python@v1
|
||||||
with:
|
with:
|
||||||
python-version: 3.7
|
python-version: 3.7
|
||||||
- name: build dummy wheel for test-pypi (hacking versioning to make it unique)
|
- name: build dummy wheel for test-pypi
|
||||||
run: |
|
run: |
|
||||||
pip install wheel
|
pip install wheel
|
||||||
python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
|
python setup.py egg_info -b ".dev`date '+%Y%m%d%H%M%S'`" build sdist bdist_wheel
|
||||||
- name: publish test-pypi
|
# - name: publish test-pypi
|
||||||
if: github.event_name != 'pull_request'
|
# # Although working and recommended, test-pypi has a limit
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
# # in the size of projects so it's better to avoid publishing
|
||||||
with:
|
# # until there is a way to garbage collect these dummy releases
|
||||||
password: ${{ secrets.test_pypi_token }}
|
# if: github.event_name != 'pull_request'
|
||||||
repository_url: https://test.pypi.org/legacy/
|
# uses: pypa/gh-action-pypi-publish@master
|
||||||
|
# with:
|
||||||
|
# password: ${{ secrets.test_pypi_token }}
|
||||||
|
# repository_url: https://test.pypi.org/legacy/
|
||||||
|
|
||||||
build-n-publish:
|
build-n-publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [linting, test]
|
needs: [linting, test]
|
||||||
|
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
- name: Set up Python 3.7
|
- name: Set up Python 3.7
|
||||||
@ -143,6 +147,5 @@ jobs:
|
|||||||
python setup.py sdist bdist_wheel
|
python setup.py sdist bdist_wheel
|
||||||
- name: publish pypi
|
- name: publish pypi
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@master
|
||||||
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
|
||||||
with:
|
with:
|
||||||
password: ${{ secrets.pypi_token }}
|
password: ${{ secrets.pypi_token }}
|
Loading…
x
Reference in New Issue
Block a user