Move scripts to a dedicated directory
(cherry picked from commit df59d6ca54dc5b4bf88f3ee81c2c09cc23d925b7)
This commit is contained in:
@@ -40,21 +40,18 @@ jobs:
|
||||
- name: Setup Firebase env
|
||||
env:
|
||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
||||
run: ./scripts/setup-firebase.sh
|
||||
|
||||
- name: Run prebuild
|
||||
run: bash prebuild.sh
|
||||
run: ./scripts/prebuild.sh
|
||||
|
||||
- name: Analyze
|
||||
uses: zgosalvez/github-actions-analyze-dart@v1
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
if [[ "${{ matrix.modules }}" == "default" ]]; then
|
||||
flutter test -r json > test-report-${{ matrix.modules }}.json
|
||||
else
|
||||
flutter test -r json ${{ matrix.modules }} > test-report-${{ matrix.modules }}.json
|
||||
fi
|
||||
env:
|
||||
MODULES: ${{ matrix.modules }}
|
||||
run: ./scripts/test.sh
|
||||
|
||||
- name: Upload test reports
|
||||
if: success() || failure() # Always upload report
|
||||
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
- name: Setup Firebase env
|
||||
env:
|
||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
||||
run: ./scripts/setup-firebase.sh
|
||||
|
||||
- name: Setup Java
|
||||
if: matrix.os == 'android'
|
||||
@@ -52,19 +52,17 @@ jobs:
|
||||
|
||||
- name: Setup iOS environment
|
||||
if: matrix.os == 'ios'
|
||||
run: |
|
||||
flutter pub get
|
||||
pod install && pod update
|
||||
run: ../scripts/setup-ios.sh
|
||||
working-directory: ${{ matrix.os }}
|
||||
|
||||
- name: Run prebuild
|
||||
run: bash prebuild.sh
|
||||
run: ./scripts/prebuild.sh
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
|
||||
run: bundle exec fastlane dev
|
||||
run: ../scripts/build-dev.sh
|
||||
working-directory: ${{ matrix.os }}
|
||||
|
||||
- name: Upload artifacts
|
||||
|
||||
@@ -30,21 +30,18 @@ jobs:
|
||||
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
|
||||
|
||||
- name: Run prebuild
|
||||
run: bash prebuild.sh
|
||||
run: ./scripts/prebuild.sh
|
||||
|
||||
- name: Configure environments
|
||||
id: configure
|
||||
env:
|
||||
FOLDER: ${{ github.event.pull_request.number }}
|
||||
run: |
|
||||
sed -i "s|SERVER_URL=.*|SERVER_URL=https://apisix.upn.integration-open-paas.org/|g" env.file
|
||||
sed -i "s|DOMAIN_REDIRECT_URL=.*|DOMAIN_REDIRECT_URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER|g" env.file
|
||||
echo "URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER" >> $GITHUB_OUTPUT
|
||||
run: ./scripts/configure-web-environment.sh
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
FOLDER: ${{ github.event.pull_request.number }}
|
||||
run: flutter build web --profile --verbose --base-href "/${GITHUB_REPOSITORY##*/}/$FOLDER/"
|
||||
run: ./scripts/build-web.sh
|
||||
|
||||
- name: Deploy to Github Pages
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
|
||||
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Setup Firebase env
|
||||
env:
|
||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
||||
run: ./scripts/setup-firebase.sh
|
||||
|
||||
- name: Setup Fastlane
|
||||
uses: ruby/setup-ruby@v1
|
||||
@@ -58,20 +58,16 @@ jobs:
|
||||
env:
|
||||
PLAY_STORE_UPLOAD_KEY_BASE64: ${{ secrets.PLAY_STORE_UPLOAD_KEY_BASE64 }}
|
||||
PLAY_STORE_KEY_INFO_BASE64: ${{ secrets.PLAY_STORE_KEY_INFO_BASE64 }}
|
||||
run: |
|
||||
echo "$PLAY_STORE_UPLOAD_KEY_BASE64" | base64 --decode > app/keystore.jks
|
||||
echo "$PLAY_STORE_KEY_INFO_BASE64" | base64 --decode > key.properties
|
||||
run: ../scripts/setup-android.sh
|
||||
working-directory: ${{ matrix.os }}
|
||||
|
||||
- name: Setup iOS environment
|
||||
if: matrix.os == 'ios'
|
||||
run: |
|
||||
flutter pub get
|
||||
pod install && pod update
|
||||
run: ../scripts/setup-ios.sh
|
||||
working-directory: ${{ matrix.os }}
|
||||
|
||||
- name: Run prebuild
|
||||
run: bash prebuild.sh
|
||||
run: ./scripts/prebuild.sh
|
||||
|
||||
- name: Build and deploy
|
||||
env:
|
||||
@@ -81,5 +77,5 @@ jobs:
|
||||
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
|
||||
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
|
||||
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
|
||||
run: bundle exec fastlane release
|
||||
run: ../scripts/build-release.sh
|
||||
working-directory: ${{ matrix.os }}
|
||||
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -eux
|
||||
bundle exec fastlane dev
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -eux
|
||||
bundle exec fastlane release
|
||||
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -eux
|
||||
flutter build web --profile --verbose --base-href "/${GITHUB_REPOSITORY##*/}/$FOLDER/"
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -eux
|
||||
sed -i "s|SERVER_URL=.*|SERVER_URL=https://apisix.upn.integration-open-paas.org/|g" env.file
|
||||
sed -i "s|DOMAIN_REDIRECT_URL=.*|DOMAIN_REDIRECT_URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER|g" env.file
|
||||
echo "URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER" >> $GITHUB_OUTPUT
|
||||
Regular → Executable
Executable
+4
@@ -0,0 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "$PLAY_STORE_UPLOAD_KEY_BASE64" | base64 --decode > app/keystore.jks
|
||||
echo "$PLAY_STORE_KEY_INFO_BASE64" | base64 --decode > key.properties
|
||||
Executable
+3
@@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -eux
|
||||
|
||||
flutter pub get
|
||||
pod install && pod update
|
||||
Executable
+9
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -eux
|
||||
|
||||
if [[ "$MODULES" == "default" ]]; then
|
||||
flutter test -r json > test-report-"$MODULES".json
|
||||
else
|
||||
flutter test -r json "$MODULES" > test-report-"$MODULES".json
|
||||
fi
|
||||
Reference in New Issue
Block a user