Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:
required: false
default: 30
type: number
schedule:
- cron: "0 7 1 * *" # 1st of every month at 08:00 CET (UTC+1)
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# schedule:
# - cron: "0 7 1 * *" # 1st of every month at 08:00 CET (UTC+1)

jobs:
pr-summary:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ on:
releaseNotes:
description: "Release notes for the distribution"
required: true
pull_request:
types: [closed]
branches:
- develop
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# pull_request:
# types: [closed]
# branches:
# - develop

env:
IOS_BUNDLE_ID: "io.parity.polkadotapp.develop"
Expand Down Expand Up @@ -60,28 +63,29 @@ jobs:
- uses: actions/checkout@v6

- name: Setup iOS Environment
uses: ./.github/actions/install
uses: ./hosts/ios/.github/actions/install
with:
match_auth_required: "true"
match_repository_pat: ${{ secrets.FASTLANE_RO_PAT }}

- name: Set Bundle ID and Profile if triggered by workflow_dispatch
if: github.event_name == 'workflow_dispatch'
run: |
echo "FIREBASE_GROUPS=${{ inputs.groups }}" >> $GITHUB_ENV
echo "RELEASE_NOTES=${{ inputs.releaseNotes }}" >> $GITHUB_ENV
echo "FIREBASE_GROUPS=${{ inputs.groups }}" >> "$GITHUB_ENV"
echo "RELEASE_NOTES=${{ inputs.releaseNotes }}" >> "$GITHUB_ENV"

- name: Calculate build number
id: build_number
run: |
BUILD_NUMBER=$((10100 + ${{ github.run_number }}))
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> $GITHUB_ENV
echo "build_number=${BUILD_NUMBER}" >> $GITHUB_OUTPUT
echo "BUILD_NUMBER=${BUILD_NUMBER}" >> "$GITHUB_ENV"
echo "build_number=${BUILD_NUMBER}" >> "$GITHUB_OUTPUT"
echo "Calculated build number: ${BUILD_NUMBER}"

- name: Update build number
env:
PBXPROJ_PATH: polkadot-app.xcodeproj/project.pbxproj
working-directory: hosts/ios
run: |
set -euo pipefail

Expand All @@ -94,31 +98,33 @@ jobs:
id: read_version
env:
PBXPROJ_PATH: polkadot-app.xcodeproj/project.pbxproj
working-directory: hosts/ios
run: |
set -euo pipefail

echo "Reading marketing version from DevCI configuration..."
MARKETING_VERSION=$(python3 .github/scripts/read_versions.py "${PBXPROJ_PATH}" \
--config-name "DevCI" \
--output-format env | grep "marketing_version=" | cut -d'=' -f2)
echo "marketing_version=${MARKETING_VERSION}" >> $GITHUB_OUTPUT
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> $GITHUB_ENV
echo "marketing_version=${MARKETING_VERSION}" >> "$GITHUB_OUTPUT"
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> "$GITHUB_ENV"

- name: Add extra Swift flags to xcconfig
if: matrix.variant.extra_swift_flags != ''
working-directory: hosts/ios
run: |
python3 .github/scripts/add_swift_flags.py \
"polkadot-app/Configs/polkadot-app.devci.xcconfig" \
"${{ matrix.variant.extra_swift_flags }}"

- name: Configure Google services
uses: ./.github/actions/configure-google-services
uses: ./hosts/ios/.github/actions/configure-google-services
with:
google_service_info_base64: ${{ secrets.GOOGLE_SERVICE_INFO_DEV_BASE64 }}
expected_bundle_id: ${{ env.IOS_BUNDLE_ID }}

- name: Configure secrets
uses: ./.github/actions/configure-secrets
uses: ./hosts/ios/.github/actions/configure-secrets
with:
sentry_dsn: ${{ secrets.SENTRY_DSN }}
meld_basic_auth_token: ${{ secrets.MELD_BASIC_AUTH_TOKEN }}
Expand All @@ -131,6 +137,7 @@ jobs:
FIREBASE_APP_ID: ${{ secrets.FIREBASE_APP_ID }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
working-directory: hosts/ios
run: |
bundle exec fastlane distribute_app_to_firebase release_notes:"$FL_RELEASE_NOTES"

Expand All @@ -139,6 +146,7 @@ jobs:
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
working-directory: hosts/ios
run: |
bundle exec fastlane build_app_ci

Expand All @@ -147,7 +155,7 @@ jobs:
if: always()
with:
name: polkadot-app-debug-ipa${{ matrix.variant.s3_suffix }}
path: "*.ipa"
path: "hosts/ios/*.ipa"
retention-days: 7

- name: Upload to S3
Expand All @@ -157,7 +165,7 @@ jobs:
s3_access_key: ${{ secrets.SCW_ACCESS_KEY }}
s3_secret_key: ${{ secrets.SCW_SECRET_KEY }}
s3_bucket: ${{ env.S3_BUCKET }}
source_path: polkadot-app.ipa
source_path: hosts/ios/polkadot-app.ipa
destination_path: /ios/develop/polkadot-app-${{ env.MARKETING_VERSION }}-${{ env.BUILD_NUMBER }}${{ matrix.variant.s3_suffix }}.ipa

- name: Upload to S3 (static path)
Expand All @@ -167,5 +175,5 @@ jobs:
s3_access_key: ${{ secrets.SCW_ACCESS_KEY }}
s3_secret_key: ${{ secrets.SCW_SECRET_KEY }}
s3_bucket: ${{ env.S3_BUCKET }}
source_path: polkadot-app.ipa
source_path: hosts/ios/polkadot-app.ipa
destination_path: /ios/develop/polkadot-app${{ matrix.variant.s3_suffix }}.ipa
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@ on:
type: string
required: false
default: ""
schedule:
- cron: "0 16 * * 1-5" # 16:00 UTC Monday-Friday
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# schedule:
# - cron: "0 16 * * 1-5" # 16:00 UTC Monday-Friday

permissions:
contents: write
Expand All @@ -27,7 +30,7 @@ permissions:

jobs:
prepare:
uses: ./.github/workflows/_prepare_pipeline.yml
uses: ./.github/workflows/ios-prepare-pipeline.yml
with:
is_nightly: true
bump_level: "no-bump"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,14 @@ concurrency:
cancel-in-progress: true

on:
schedule:
# 02:30 UTC — runs after the nightly Firebase distribution on develop
# (typically completes by ~01:00 UTC after the day's last merge), so
# the simulator artifact reflects the same code that Firebase shipped.
- cron: "30 2 * * *"
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# schedule:
# # 02:30 UTC — runs after the nightly Firebase distribution on develop
# # (typically completes by ~01:00 UTC after the day's last merge), so
# # the simulator artifact reflects the same code that Firebase shipped.
# - cron: "30 2 * * *"
workflow_dispatch:

permissions:
Expand All @@ -39,21 +42,22 @@ jobs:
- uses: actions/checkout@v6

- name: Setup iOS Environment
uses: ./.github/actions/install
uses: ./hosts/ios/.github/actions/install

- name: Configure Google services
uses: ./.github/actions/configure-google-services
uses: ./hosts/ios/.github/actions/configure-google-services
with:
google_service_info_base64: ${{ secrets.GOOGLE_SERVICE_INFO_RELEASE_BASE64 }}
expected_bundle_id: ${{ env.IOS_BUNDLE_ID }}

- name: Configure secrets
uses: ./.github/actions/configure-secrets
uses: ./hosts/ios/.github/actions/configure-secrets
with:
sentry_dsn: ${{ secrets.SENTRY_DSN }}
meld_basic_auth_token: ${{ secrets.MELD_BASIC_AUTH_TOKEN }}

- name: Build simulator .app
working-directory: hosts/ios
run: bundle exec fastlane build_app_simulator

- name: Compute release tag + name
Expand All @@ -71,20 +75,21 @@ jobs:

- name: Zip .app bundle
id: zip
working-directory: hosts/ios
run: |
set -euo pipefail
cd build_simulator
# `.app` is a directory bundle; zip preserves the structure so
# consumers can unzip and `xcrun simctl install` the result.
APP_DIR=$(ls -d *.app | head -1)
APP_DIR=$(ls -d ./*.app | head -1)
if [ -z "$APP_DIR" ]; then
echo "::error::No .app directory found under build_simulator/"
exit 1
fi
ARCHIVE="polkadot-app-simulator.app.zip"
zip -ry "$ARCHIVE" "$APP_DIR"
ls -la "$ARCHIVE"
echo "archive=build_simulator/$ARCHIVE" >> "$GITHUB_OUTPUT"
echo "archive=hosts/ios/build_simulator/$ARCHIVE" >> "$GITHUB_OUTPUT"

- name: Publish GitHub Release
uses: softprops/action-gh-release@v2
Expand Down
27 changes: 17 additions & 10 deletions hosts/ios/.github/workflows/pr.yml → .github/workflows/ios-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ concurrency:
cancel-in-progress: true

on:
pull_request:
workflow_dispatch:
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# pull_request:

permissions:
contents: read
Expand Down Expand Up @@ -52,19 +56,19 @@ jobs:
- uses: actions/checkout@v6

- name: Setup iOS Environment
uses: ./.github/actions/install
uses: ./hosts/ios/.github/actions/install
with:
match_auth_required: "true"
match_repository_pat: ${{ secrets.FASTLANE_RO_PAT }}

- name: Configure Google services
uses: ./.github/actions/configure-google-services
uses: ./hosts/ios/.github/actions/configure-google-services
with:
google_service_info_base64: ${{ secrets.GOOGLE_SERVICE_INFO_DEV_BASE64 }}
expected_bundle_id: ${{ env.IOS_BUNDLE_ID }}

- name: Configure secrets
uses: ./.github/actions/configure-secrets
uses: ./hosts/ios/.github/actions/configure-secrets
with:
sentry_dsn: ${{ secrets.SENTRY_DSN }}
meld_basic_auth_token: ${{ secrets.MELD_BASIC_AUTH_TOKEN }}
Expand All @@ -73,6 +77,7 @@ jobs:
env:
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
working-directory: hosts/ios
run: |
# Pass debug flag to fastlane if DEBUG_CI is enabled
if [ "${{ env.DEBUG_CI }}" = "true" ]; then
Expand All @@ -87,6 +92,7 @@ jobs:
- name: Warning ratchet
id: ratchet
continue-on-error: true
working-directory: hosts/ios
run: |
Runscripts/extract_xcresult.sh \
--out current_warnings.json \
Expand Down Expand Up @@ -127,7 +133,7 @@ jobs:
with:
name: build-artifacts-${{ github.run_number }}
path: |
./fastlane/build_logs/
hosts/ios/fastlane/build_logs/
retention-days: 3

test:
Expand All @@ -138,21 +144,22 @@ jobs:
- uses: actions/checkout@v6

- name: Setup iOS Environment
uses: ./.github/actions/install
uses: ./hosts/ios/.github/actions/install

- name: Configure Google services
uses: ./.github/actions/configure-google-services
uses: ./hosts/ios/.github/actions/configure-google-services
with:
google_service_info_base64: ${{ secrets.GOOGLE_SERVICE_INFO_DEV_BASE64 }}
expected_bundle_id: ${{ env.IOS_BUNDLE_ID }}

- name: Configure secrets
uses: ./.github/actions/configure-secrets
uses: ./hosts/ios/.github/actions/configure-secrets
with:
sentry_dsn: ${{ secrets.SENTRY_DSN }}
meld_basic_auth_token: ${{ secrets.MELD_BASIC_AUTH_TOKEN }}

- name: Run tests
working-directory: hosts/ios
run: |
# Pass debug flag to fastlane if DEBUG_CI is enabled
if [ "${{ env.DEBUG_CI }}" = "true" ]; then
Expand All @@ -169,6 +176,6 @@ jobs:
with:
name: test-artifacts-${{ github.run_number }}
path: |
./fastlane/test_output/
./fastlane/build_logs/
hosts/ios/fastlane/test_output/
hosts/ios/fastlane/build_logs/
retention-days: 3
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
name: Release Branch Lifecycle

on:
pull_request:
types: [closed]
branches:
- main
workflow_dispatch:
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# pull_request:
# types: [closed]
# branches:
# - main

permissions:
contents: write
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: Release Distribution

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
# Held on workflow_dispatch until the build credentials tracked in #672
# land. The trigger below is the one this workflow runs on; restoring it
# is the change that puts this workflow live.
# pull_request:
# types: [opened, synchronize, reopened]
# branches:
# - main
workflow_dispatch:
inputs:
release_branch:
Expand All @@ -30,7 +33,7 @@ jobs:
github.event_name == 'workflow_dispatch' ||
(startsWith(github.head_ref, 'release/') &&
!contains(github.event.pull_request.body, 'nightly_build=true'))
uses: ./.github/workflows/_build_distribute.yml
uses: ./.github/workflows/ios-build-distribute.yml
with:
release_branch: ${{ inputs.release_branch || github.head_ref }}
release_pr_number: ${{ inputs.release_pr_number || github.event.pull_request.number || '' }}
Expand Down
Loading