remove hashes from version. upload to pypi in same step as S3
This commit is contained in:
parent
5a22a0f601
commit
abfeb69454
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@ -63,14 +63,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install setuptools wheel twine
|
pip install setuptools wheel twine
|
||||||
- name: Publish stubs
|
|
||||||
if: contains(steps.need-pypi.outputs.setup-py, 'setup.py')
|
|
||||||
env:
|
|
||||||
TWINE_USERNAME: ${{ secrets.pypi_username }}
|
|
||||||
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
|
||||||
run: |
|
|
||||||
python setup.py sdist
|
|
||||||
twine upload dist/*
|
|
||||||
- name: Test Documentation Build (HTML)
|
- name: Test Documentation Build (HTML)
|
||||||
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
|
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
@ -126,6 +118,13 @@ jobs:
|
|||||||
name: mpy-cross.static-x64-windows
|
name: mpy-cross.static-x64-windows
|
||||||
path: mpy-cross/mpy-cross.static.exe
|
path: mpy-cross/mpy-cross.static.exe
|
||||||
- name: Upload stubs and mpy-cross builds to S3
|
- name: Upload stubs and mpy-cross builds to S3
|
||||||
|
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
||||||
|
env:
|
||||||
|
AWS_PAGER: ''
|
||||||
|
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||||
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
|
TWINE_USERNAME: ${{ secrets.pypi_username }}
|
||||||
|
TWINE_PASSWORD: ${{ secrets.pypi_password }}
|
||||||
run: |
|
run: |
|
||||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-aarch64 s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-aarch64-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
||||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
|
||||||
@ -133,12 +132,10 @@ jobs:
|
|||||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
|
||||||
zip -9r circuitpython-stubs.zip circuitpython-stubs
|
zip -9r circuitpython-stubs.zip circuitpython-stubs
|
||||||
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
|
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
|
||||||
env:
|
if [[ -z "${{steps.need-pypi.outputs.setup-py}}" && -z "$TWINE_PASSWORD" ]]; then
|
||||||
AWS_PAGER: ''
|
python setup.py sdist
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
twine upload dist/*
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
fi
|
||||||
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
|
||||||
|
|
||||||
|
|
||||||
mpy-cross-mac:
|
mpy-cross-mac:
|
||||||
runs-on: macos-10.15
|
runs-on: macos-10.15
|
||||||
|
2
setup.py
2
setup.py
@ -20,8 +20,6 @@ version = git_out.strip().decode("utf-8")
|
|||||||
# Detect a development build and mutate it to be valid semver and valid python version.
|
# Detect a development build and mutate it to be valid semver and valid python version.
|
||||||
pieces = version.split("-")
|
pieces = version.split("-")
|
||||||
if len(pieces) > 2:
|
if len(pieces) > 2:
|
||||||
# Merge the commit portion onto the commit count since the tag.
|
|
||||||
pieces[-2] += "+" + pieces[-1]
|
|
||||||
pieces.pop()
|
pieces.pop()
|
||||||
# Merge the commit count and build to the pre-release identifier.
|
# Merge the commit count and build to the pre-release identifier.
|
||||||
pieces[-2] += ".dev." + pieces[-1]
|
pieces[-2] += ".dev." + pieces[-1]
|
||||||
|
Loading…
Reference in New Issue
Block a user