Skip to content

Commit

Permalink
ci: s3 path for artifacts adjustment (WPB-8730) (#3131)
Browse files Browse the repository at this point in the history
  • Loading branch information
yamilmedina authored Jun 27, 2024
1 parent 43a460f commit 1ab655a
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/actions/deploy-to-s3/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,37 @@ inputs:
runs:
using: "composite"
steps:
- name: Copy build to tmp file
- name: Set APK full path
id: path
shell: bash
run:
cp app/build/outputs/apk/${{ inputs.build-flavour }}/${{ inputs.build-variant }}/com.wire.*.apk wire-android-${{ inputs.build-flavour }}-${{ inputs.build-variant }}-pr-${{ github.event.pull_request.number }}.apk
- name: Upload to S3
run: |
APK_FULL_PATH_REF="$(set -- app/build/outputs/apk/${{ inputs.build-flavour }}/${{ inputs.build-variant }}/com.wire.*.apk; echo $1)"
echo "apk_full_path=$APK_FULL_PATH_REF" >> $GITHUB_OUTPUT
unset APK_FULL_PATH_REF
- name: Upload to S3 from PR
if: github.event.pull_request.number != ''
id: upload
uses: hkusu/s3-upload-action@v2.1.0
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: 'us-west-1'
aws-bucket: ${{ inputs.aws-bucket }}
destination-dir: "megazord/android/reloaded/${{ inputs.build-flavour }}/${{ inputs.build-variant }}/PR-${{ github.event.pull_request.number }}/"
file-path: ${{ steps.path.outputs.apk_full_path }}
output-file-url: 'true'
public: true
- name: Upload to S3 from branch
if: github.event.pull_request.number == ''
id: upload-from-branch
uses: hkusu/s3-upload-action@v2.1.0
with:
aws-access-key-id: ${{ inputs.aws-access-key-id }}
aws-secret-access-key: ${{ inputs.aws-secret-access-key }}
aws-region: 'us-west-1'
aws-bucket: ${{ inputs.aws-bucket }}
destination-dir: "megazord/android/reloaded/${{ inputs.build-flavour }}/${{ inputs.build-variant }}/"
file-path: './wire-android-${{ inputs.build-flavour }}-${{ inputs.build-variant }}-pr-${{ github.event.pull_request.number }}.apk'
file-path: ${{ steps.path.outputs.apk_full_path }}
output-file-url: 'true'
public: true
- name: Show URL
Expand Down

0 comments on commit 1ab655a

Please sign in to comment.