Skip to content

Commit

Permalink
Do not push ios build to s3.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Jun 17, 2024
1 parent 6c1eb44 commit 23e7743
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 38 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ on:
type: string
required: true


env:
GOPRIVATE: github.com/getlantern
S3_BUCKET: lantern


jobs:
build-android:
env:
Expand Down
71 changes: 35 additions & 36 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ on:
required: true
env:
GOPRIVATE: github.com/getlantern
S3_BUCKET: lantern
jobs:
build-ios:
runs-on: ${{ inputs.macos_version }}
Expand Down Expand Up @@ -149,38 +148,38 @@ jobs:
name: Lantern.ipa
path: ${{ github.workspace }}/build/ios/ipa/Lantern.ipa
retention-days: 2

- name: Compress artifacts using bzip2
run: |
cd ${{ github.workspace }}/build/ios/ipa/
bzip2 -zk Lantern.ipa
- name: Copy .ipa and .bz2 to root
run: |
cp ${{ github.workspace }}/build/ios/ipa/Lantern.ipa ${{ github.workspace }}/Lantern.ipa
cp ${{ github.workspace }}/build/ios/ipa/Lantern.ipa.bz2 ${{ github.workspace }}/Lantern.ipa.bz2
- name: Install s3cmd
run: pip install s3cmd

- name: Set s3cmd permissions
run: |
echo "[default]" > "$HOME/.s3cfg"
echo "access_key = ${{ secrets.AWS_ACCESS_KEY }}" >> "$HOME/.s3cfg"
echo "secret_key = ${{ secrets.AWS_SECRET_KEY }}" >> "$HOME/.s3cfg"
- name: Push binaries to s3
env:
VERSION: "${{ env.version }}"
IPA: "${{ env.prefix }}-${{ env.version }}.ipa"
update: "lantern_update_ios-${{inputs.version}}.bz2"
update_source: Lantern.ipa.bz2
run: |
mv ${{ env.update_source }} ${{ env.update }}
mv Lantern.ipa "$IPA"
cp "$IPA" ${{ env.prefix }}.ipa
echo ${{ env.version }} > ${{ env.version_file }}
shasum -a 256 "$IPA" | cut -d " " -f 1 > "$IPA".sha256
shasum -a 256 ${{ env.update }} | cut -d " " -f 1 > ${{ env.update }}.sha256
cp "$IPA".sha256 ${{ env.prefix }}.ipa.sha256
s3cmd put --acl-public "$IPA" "$IPA".sha256 ${{ env.update }} ${{ env.update }}.sha256 ${{ env.version_file }} ${{ env.prefix }}.ipa.sha256 ${{ env.prefix }}.ipa "s3://lantern"
#
# - name: Compress artifacts using bzip2
# run: |
# cd ${{ github.workspace }}/build/ios/ipa/
# bzip2 -zk Lantern.ipa
#
# - name: Copy .ipa and .bz2 to root
# run: |
# cp ${{ github.workspace }}/build/ios/ipa/Lantern.ipa ${{ github.workspace }}/Lantern.ipa
# cp ${{ github.workspace }}/build/ios/ipa/Lantern.ipa.bz2 ${{ github.workspace }}/Lantern.ipa.bz2
#
# - name: Install s3cmd
# run: pip install s3cmd
#
# - name: Set s3cmd permissions
# run: |
# echo "[default]" > "$HOME/.s3cfg"
# echo "access_key = ${{ secrets.AWS_ACCESS_KEY }}" >> "$HOME/.s3cfg"
# echo "secret_key = ${{ secrets.AWS_SECRET_KEY }}" >> "$HOME/.s3cfg"
#
# - name: Push binaries to s3
# env:
# VERSION: "${{ env.version }}"
# IPA: "${{ env.prefix }}-${{ env.version }}.ipa"
# update: "lantern_update_ios-${{inputs.version}}.bz2"
# update_source: Lantern.ipa.bz2
# run: |
# mv ${{ env.update_source }} ${{ env.update }}
# mv Lantern.ipa "$IPA"
# cp "$IPA" ${{ env.prefix }}.ipa
# echo ${{ env.version }} > ${{ env.version_file }}
# shasum -a 256 "$IPA" | cut -d " " -f 1 > "$IPA".sha256
# shasum -a 256 ${{ env.update }} | cut -d " " -f 1 > ${{ env.update }}.sha256
# cp "$IPA".sha256 ${{ env.prefix }}.ipa.sha256
# s3cmd put --acl-public "$IPA" "$IPA".sha256 ${{ env.update }} ${{ env.update }}.sha256 ${{ env.version_file }} ${{ env.prefix }}.ipa.sha256 ${{ env.prefix }}.ipa "s3://lantern"

0 comments on commit 23e7743

Please sign in to comment.