From 3036348f7278ea8104c059717869162d9fc04e50 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 16 Feb 2023 08:53:18 +0530 Subject: [PATCH] couple ci fixes - upload stubs as `.tar.gz` instead of `.zip` - append recursive flag only when the source ends with a backslash --- .github/actions/upload_aws/action.yml | 3 ++- .github/workflows/build.yml | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/actions/upload_aws/action.yml b/.github/actions/upload_aws/action.yml index 7aee8c7e78..643dd00342 100644 --- a/.github/actions/upload_aws/action.yml +++ b/.github/actions/upload_aws/action.yml @@ -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 }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6159f7291e..e9146c39b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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