-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
github: app publish tasks improvements
- Loading branch information
kar
committed
Oct 30, 2024
1 parent
8313461
commit cd215f2
Showing
2 changed files
with
61 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,35 +20,63 @@ jobs: | |
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
submodules: false | ||
|
||
- name: Set Up JDK | ||
uses: actions/setup-java@v4 | ||
with: | ||
distribution: 'zulu' | ||
java-version: 17 | ||
- name: Initialize and update six-android | ||
run: | | ||
git submodule update --init --recursive . | ||
- name: Change wrapper permissions | ||
run: chmod +x ./gradlew | ||
- name: Get six-android Commit SHA | ||
id: get_ref | ||
run: | | ||
REPO_A_REF=$(git -C . rev-parse HEAD) | ||
echo "REPO_A_REF=${REPO_A_REF}" | ||
echo "REPO_A_REF=${REPO_A_REF}" >> $GITHUB_ENV | ||
- name: Get Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: 'stable' | ||
- name: Get Workflow Run ID for Commit SHA of six-android | ||
id: get_run_id | ||
run: | | ||
set -o pipefail # Ensure any command failure in the pipeline fails the step | ||
REPO="blokadaorg/six-android" | ||
REF=${{ env.REPO_A_REF }} | ||
- name: Build common lib | ||
# Find the workflow run ID for the specific commit SHA | ||
WORKFLOW_RUN_ID=$(curl -s -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \ | ||
"https://api.github.com/repos/$REPO/actions/runs?status=completed&branch=main" \ | ||
| jq -r ".workflow_runs[] | select(.head_sha == \"$REF\").id" | head -n 1) | ||
echo "WORKFLOW_RUN_ID=${WORKFLOW_RUN_ID}" >> $GITHUB_ENV | ||
- name: Download Artifact from six-android | ||
if: env.WORKFLOW_RUN_ID # Only proceed if we have a valid workflow run ID | ||
run: | | ||
git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "[email protected]:" | ||
make sixcommon | ||
set -o pipefail # Ensure any command failure in the pipeline fails the step | ||
REPO="blokadaorg/six-android" | ||
ARTIFACT_NAME="blokadafamily.aab" | ||
WORKFLOW_RUN_ID=${{ env.WORKFLOW_RUN_ID }} | ||
# Get the artifact download URL | ||
ARTIFACT_URL=$(curl -s -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \ | ||
"https://api.github.com/repos/$REPO/actions/runs/$WORKFLOW_RUN_ID/artifacts" \ | ||
| jq -r ".artifacts[] | select(.name == \"$ARTIFACT_NAME\").archive_download_url") | ||
- name: Build aab | ||
run: make aabfamily | ||
# Download the artifact | ||
curl -L -H "Authorization: token ${{ secrets.SIXCOMMON_TOKEN }}" \ | ||
-o artifact.zip "$ARTIFACT_URL" | ||
- name: Unzip six-android artifact | ||
if: env.WORKFLOW_RUN_ID # Ensure the artifact was successfully downloaded | ||
run: | | ||
mkdir -p artifact | ||
unzip artifact.zip -d artifact/ | ||
echo "Checking extracted paths" | ||
ls -la artifact/ | ||
- name: Sign app AAB | ||
uses: r0adkll/sign-android-release@v1 | ||
id: sign_app | ||
with: | ||
releaseDirectory: six-android/app/build/outputs/bundle/familyRelease | ||
releaseDirectory: six-android/artifact | ||
signingKeyBase64: ${{ secrets.SIGNING_KEY }} | ||
alias: ${{ secrets.ALIAS }} | ||
keyStorePassword: ${{ secrets.KEY_STORE_PASSWORD }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Blokada 6 for iOS (Publish) | ||
name: Internal Blokada 6 for iOS | ||
|
||
on: | ||
workflow_dispatch: | ||
|
@@ -25,10 +25,24 @@ jobs: | |
with: | ||
channel: 'stable' | ||
|
||
# Manually install FVM and add it to PATH | ||
- name: Install FVM | ||
run: | | ||
flutter pub global activate fvm | ||
echo "$HOME/.pub-cache/bin" >> $GITHUB_PATH | ||
- name: Verify FVM installation | ||
run: fvm --version | ||
|
||
- name: Build common lib | ||
run: | | ||
git config --global url."https://${{ secrets.GIT_TOKEN }}@github.com/".insteadOf "[email protected]:" | ||
make sixcommon | ||
- name: Set up Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' # Replace with the Go version you need | ||
|
||
- name: Set up ruby env | ||
uses: ruby/setup-ruby@v1 | ||
|
@@ -56,11 +70,3 @@ jobs: | |
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | ||
ASC_KEY: ${{ secrets.ASC_PRIVATE_KEY }} | ||
KEYCHAIN_PATH: ~/Library/Keychains/signing_temp.keychain-db | ||
|
||
- name: Upload app-store ipa and dsyms to artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: app-store ipa & dsyms | ||
path: | | ||
${{ github.workspace }}/example-iOS.ipa | ||
${{ github.workspace }}/*.app.dSYM.zip |