Skip to content

Commit 7842eea

Browse files
niteshnitesh
authored andcommitted
add build.sh file and a workflow to make a reproducible build
Signed-off-by: nitesh <[email protected]>
1 parent afd1fc0 commit 7842eea

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build Android
2+
on:
3+
push:
4+
branches:
5+
- reproducible-builds-2
6+
7+
jobs:
8+
build-android:
9+
runs-on: ubuntu-latest
10+
container: reactnativecommunity/react-native-android@sha256:4ff9c9f80da57c72284900fcfdbd079183e735684c62d7fafd3df50fdb895453
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Envinfo
14+
run: npx envinfo
15+
- name: Install dependencies
16+
run: |
17+
apt-get update
18+
apt-get install -y curl unzip
19+
- name: Build application
20+
run: chmod +x build.sh && ./build.sh

build.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
# reactnativecommunity/react-native-android:13.0
3+
BUILDER_IMAGE="reactnativecommunity/react-native-android@sha256:4ff9c9f80da57c72284900fcfdbd079183e735684c62d7fafd3df50fdb895453"
4+
CONTAINER_NAME="blixt_builder_container"
5+
BLIXT_PATH=/blixt
6+
7+
docker run --rm -it --name $CONTAINER_NAME -v `pwd`:$BLIXT_PATH $BUILDER_IMAGE bash -c \
8+
'echo -e "\n\n********************************\n*** Building Blixt...\n********************************\n" && \
9+
cd /blixt ; yarn build-unsigned-android
10+
11+
echo -e "\n\n********************************\n**** APKs and SHA256 Hashes\n********************************\n" && \
12+
cd /blixt && \
13+
for f in android/app/build/outputs/apk/release/*.apk;
14+
do
15+
RENAMED_FILENAME=$(echo $f | sed -e "s/app-/blixt-/" | sed -e "s/-release-unsigned//")
16+
mv $f $RENAMED_FILENAME
17+
sha256sum $RENAMED_FILENAME
18+
done && \
19+
echo -e "\n" ';

fetch_libraries.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)