Skip to content

chore: increment build number to 1.1.2+117 #164

chore: increment build number to 1.1.2+117

chore: increment build number to 1.1.2+117 #164

Workflow file for this run

name: Distribution
on:
pull_request_target:
branches: ["main"]
types: [closed]
env:
PROPERTIES_PATH: "android/key.properties"
jobs:
build-android:
if: >
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'build-number-bump')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# pull_request_target checks out the base repo by default; ensure you build the merged code:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Run clean
run: flutter clean
- name: Install dependencies (post-clean)
run: flutter pub get
- name: Add build_runner (for code generation)
run: dart pub add build_runner --dev
- name: Run build_runner build
run: dart run build_runner build --delete-conflicting-outputs
- name: Upload-keystore generator
run: |
echo "${{ secrets.UPLOAD_KEYSTORE }}" | base64 -d > android/app/key.jks
- name: Key.Properties
run: |
{
echo "keyPassword=${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }}"
echo "storePassword=${{ secrets.UPLOAD_KEYSTORE_PASSPHRASE }}"
echo "keyAlias=${{ secrets.ALIAS }}"
} > "${{ env.PROPERTIES_PATH }}"
- name: Build Android appBundle
run: flutter build appbundle --release --android-skip-build-dependency-validation
- name: Upload AAB
uses: actions/upload-artifact@v4
with:
name: waves-android
path: build/app/outputs/bundle/release/app-release.aab
- name: Deploy to Play Store (BETA)
uses: r0adkll/upload-google-play@v1
with:
serviceAccountJsonPlainText: ${{ secrets.SERVICE_ACCOUNT_JSON }}
packageName: com.ecency.waves
releaseFiles: build/app/outputs/bundle/release/app-release.aab
track: internal
status: completed
build-ios:
if: >
github.event.pull_request.merged == true &&
startsWith(github.event.pull_request.head.ref, 'build-number-bump')
runs-on: macos-15
steps:
- name: Select Xcode 16.3
run: sudo xcode-select -s /Applications/Xcode_16.3.app/Contents/Developer
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Install the Apple certificate and provisioning profile
env:
BUILD_CERTIFICATE_BASE64: ${{ secrets.CERTIFICATES_P12 }}
P12_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }}
BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.PROVISIONING_PROFILE }}
KEYCHAIN_PASSWORD: ${{ secrets.APPLE_APP_PASS }}
run: |
CERTIFICATE_PATH=$RUNNER_TEMP/build_certificate.p12
PP_PATH=$RUNNER_TEMP/build_pp.mobileprovision
KEYCHAIN_PATH=$RUNNER_TEMP/app-signing.keychain-db
echo -n "$BUILD_CERTIFICATE_BASE64" | base64 --decode -o "$CERTIFICATE_PATH"
echo -n "$BUILD_PROVISION_PROFILE_BASE64" | base64 --decode -o "$PP_PATH"
security create-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security set-keychain-settings -lut 21600 "$KEYCHAIN_PATH"
security unlock-keychain -p "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security import "$CERTIFICATE_PATH" -P "$P12_PASSWORD" -A -t cert -f pkcs12 -k "$KEYCHAIN_PATH"
security set-key-partition-list -S apple-tool:,apple: -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN_PATH"
security list-keychain -d user -s "$KEYCHAIN_PATH"
mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
cp "$PP_PATH" ~/Library/MobileDevice/Provisioning\ Profiles
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install dependencies
run: |
flutter pub get
dart pub add build_runner --dev
- name: Run build_runner build
run: dart run build_runner build --delete-conflicting-outputs
- name: Building IPA
run: |
flutter build ipa --release \
--export-options-plist=ios/Runner/ExportOptions.plist
- name: Upload to AppStoreConnect
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_PASS: ${{ secrets.APPLE_APP_PASS }}
run: xcrun altool --upload-app -f "build/ios/ipa/waves.ipa" -t ios -u "$APPLE_ID" -p "$APPLE_APP_PASS"