couple ci fixes
- upload stubs as `.tar.gz` instead of `.zip` - append recursive flag only when the source ends with a backslash
This commit is contained in:
parent
ca24cff0d3
commit
3036348f72
3
.github/actions/upload_aws/action.yml
vendored
3
.github/actions/upload_aws/action.yml
vendored
@ -24,7 +24,8 @@ runs:
|
||||
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
||||
run: >-
|
||||
[ -z "$AWS_ACCESS_KEY_ID" ] ||
|
||||
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }} --recursive --no-progress --region us-east-1
|
||||
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }}
|
||||
${{ endsWith(inputs.source, '/') && '--recursive' || '' }} --no-progress --region us-east-1
|
||||
env:
|
||||
AWS_PAGER: ''
|
||||
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}
|
||||
|
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@ -200,16 +200,11 @@ jobs:
|
||||
with:
|
||||
name: docs
|
||||
path: _build/latex
|
||||
- name: Zip stubs
|
||||
if: >-
|
||||
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
|
||||
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
|
||||
run: zip -9r circuitpython-stubs.zip circuitpython-stubs
|
||||
- name: Upload to S3
|
||||
uses: ./.github/actions/upload_aws
|
||||
with:
|
||||
source: circuitpython-stubs/dist/*.tar.gz
|
||||
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip
|
||||
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.tar.gz
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
- name: Upload stubs to PyPi
|
||||
|
Loading…
Reference in New Issue
Block a user