Skip to content

Commit

Permalink
add build.sh file and a workflow to make a reproducible build
Browse files Browse the repository at this point in the history
Signed-off-by: nitesh <[email protected]>
  • Loading branch information
nitesh authored and hsjoberg committed Jun 10, 2024
1 parent 46397e8 commit 85bea8d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/reproducible_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Build Android
on:
push:
branches:
- reproducible-builds-2

jobs:
build-android:
runs-on: ubuntu-latest
container: reactnativecommunity/react-native-android@sha256:4ff9c9f80da57c72284900fcfdbd079183e735684c62d7fafd3df50fdb895453
steps:
- uses: actions/checkout@v4
- name: Envinfo
run: npx envinfo
- name: Install dependencies
run: |
apt-get update
apt-get install -y curl unzip
- name: Build application
run: chmod +x build.sh && ./build.sh
19 changes: 19 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# reactnativecommunity/react-native-android:13.0
BUILDER_IMAGE="reactnativecommunity/react-native-android@sha256:4ff9c9f80da57c72284900fcfdbd079183e735684c62d7fafd3df50fdb895453"
CONTAINER_NAME="blixt_builder_container"
BLIXT_PATH=/blixt

docker run --rm -it --name $CONTAINER_NAME -v `pwd`:$BLIXT_PATH $BUILDER_IMAGE bash -c \
'echo -e "\n\n********************************\n*** Building Blixt...\n********************************\n" && \
cd /blixt ; yarn build-unsigned-android
echo -e "\n\n********************************\n**** APKs and SHA256 Hashes\n********************************\n" && \
cd /blixt && \
for f in android/app/build/outputs/apk/release/*.apk;
do
RENAMED_FILENAME=$(echo $f | sed -e "s/app-/blixt-/" | sed -e "s/-release-unsigned//")
mv $f $RENAMED_FILENAME
sha256sum $RENAMED_FILENAME
done && \
echo -e "\n" ';
Empty file modified fetch_libraries.sh
100644 → 100755
Empty file.

0 comments on commit 85bea8d

Please sign in to comment.