Skip to content

Commit 3036348

Browse files
committed
couple ci fixes
- upload stubs as `.tar.gz` instead of `.zip` - append recursive flag only when the source ends with a backslash
1 parent ca24cff commit 3036348

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

.github/actions/upload_aws/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ runs:
2424
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
2525
run: >-
2626
[ -z "$AWS_ACCESS_KEY_ID" ] ||
27-
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }} --recursive --no-progress --region us-east-1
27+
aws s3 cp ${{ inputs.source }} s3://adafruit-circuit-python/bin/${{ inputs.destination }}
28+
${{ endsWith(inputs.source, '/') && '--recursive' || '' }} --no-progress --region us-east-1
2829
env:
2930
AWS_PAGER: ''
3031
AWS_ACCESS_KEY_ID: ${{ inputs.AWS_ACCESS_KEY_ID }}

.github/workflows/build.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,16 +200,11 @@ jobs:
200200
with:
201201
name: docs
202202
path: _build/latex
203-
- name: Zip stubs
204-
if: >-
205-
(github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') ||
206-
(github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
207-
run: zip -9r circuitpython-stubs.zip circuitpython-stubs
208203
- name: Upload to S3
209204
uses: ./.github/actions/upload_aws
210205
with:
211206
source: circuitpython-stubs/dist/*.tar.gz
212-
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip
207+
destination: stubs/circuitpython-stubs-${{ env.CP_VERSION }}.tar.gz
213208
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
214209
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
215210
- name: Upload stubs to PyPi

0 commit comments

Comments
 (0)