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
|
- name: Setup Firebase env
|
||||||
env:
|
env:
|
||||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
run: ./scripts/setup-firebase.sh
|
||||||
|
|
||||||
- name: Run prebuild
|
- name: Run prebuild
|
||||||
run: bash prebuild.sh
|
run: ./scripts/prebuild.sh
|
||||||
|
|
||||||
- name: Analyze
|
- name: Analyze
|
||||||
uses: zgosalvez/github-actions-analyze-dart@v1
|
uses: zgosalvez/github-actions-analyze-dart@v1
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
env:
|
||||||
if [[ "${{ matrix.modules }}" == "default" ]]; then
|
MODULES: ${{ matrix.modules }}
|
||||||
flutter test -r json > test-report-${{ matrix.modules }}.json
|
run: ./scripts/test.sh
|
||||||
else
|
|
||||||
flutter test -r json ${{ matrix.modules }} > test-report-${{ matrix.modules }}.json
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload test reports
|
- name: Upload test reports
|
||||||
if: success() || failure() # Always upload report
|
if: success() || failure() # Always upload report
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
- name: Setup Firebase env
|
- name: Setup Firebase env
|
||||||
env:
|
env:
|
||||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
run: ./scripts/setup-firebase.sh
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
if: matrix.os == 'android'
|
if: matrix.os == 'android'
|
||||||
@@ -52,19 +52,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Setup iOS environment
|
- name: Setup iOS environment
|
||||||
if: matrix.os == 'ios'
|
if: matrix.os == 'ios'
|
||||||
run: |
|
run: ../scripts/setup-ios.sh
|
||||||
flutter pub get
|
|
||||||
pod install && pod update
|
|
||||||
working-directory: ${{ matrix.os }}
|
working-directory: ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Run prebuild
|
- name: Run prebuild
|
||||||
run: bash prebuild.sh
|
run: ./scripts/prebuild.sh
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
|
||||||
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
|
APPLE_CERTIFICATES_SSH_KEY: ${{ secrets.APPLE_CERTIFICATES_SSH_KEY }}
|
||||||
run: bundle exec fastlane dev
|
run: ../scripts/build-dev.sh
|
||||||
working-directory: ${{ matrix.os }}
|
working-directory: ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
|
|||||||
@@ -30,21 +30,18 @@ jobs:
|
|||||||
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
|
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
|
||||||
|
|
||||||
- name: Run prebuild
|
- name: Run prebuild
|
||||||
run: bash prebuild.sh
|
run: ./scripts/prebuild.sh
|
||||||
|
|
||||||
- name: Configure environments
|
- name: Configure environments
|
||||||
id: configure
|
id: configure
|
||||||
env:
|
env:
|
||||||
FOLDER: ${{ github.event.pull_request.number }}
|
FOLDER: ${{ github.event.pull_request.number }}
|
||||||
run: |
|
run: ./scripts/configure-web-environment.sh
|
||||||
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
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
env:
|
env:
|
||||||
FOLDER: ${{ github.event.pull_request.number }}
|
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
|
- name: Deploy to Github Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ jobs:
|
|||||||
- name: Setup Firebase env
|
- name: Setup Firebase env
|
||||||
env:
|
env:
|
||||||
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
FIREBASE_ENV: ${{ secrets.FIREBASE_ENV }}
|
||||||
run: echo "$FIREBASE_ENV" > ./configurations/env.fcm
|
run: ./scripts/setup-firebase.sh
|
||||||
|
|
||||||
- name: Setup Fastlane
|
- name: Setup Fastlane
|
||||||
uses: ruby/setup-ruby@v1
|
uses: ruby/setup-ruby@v1
|
||||||
@@ -58,20 +58,16 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
PLAY_STORE_UPLOAD_KEY_BASE64: ${{ secrets.PLAY_STORE_UPLOAD_KEY_BASE64 }}
|
PLAY_STORE_UPLOAD_KEY_BASE64: ${{ secrets.PLAY_STORE_UPLOAD_KEY_BASE64 }}
|
||||||
PLAY_STORE_KEY_INFO_BASE64: ${{ secrets.PLAY_STORE_KEY_INFO_BASE64 }}
|
PLAY_STORE_KEY_INFO_BASE64: ${{ secrets.PLAY_STORE_KEY_INFO_BASE64 }}
|
||||||
run: |
|
run: ../scripts/setup-android.sh
|
||||||
echo "$PLAY_STORE_UPLOAD_KEY_BASE64" | base64 --decode > app/keystore.jks
|
|
||||||
echo "$PLAY_STORE_KEY_INFO_BASE64" | base64 --decode > key.properties
|
|
||||||
working-directory: ${{ matrix.os }}
|
working-directory: ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Setup iOS environment
|
- name: Setup iOS environment
|
||||||
if: matrix.os == 'ios'
|
if: matrix.os == 'ios'
|
||||||
run: |
|
run: ../scripts/setup-ios.sh
|
||||||
flutter pub get
|
|
||||||
pod install && pod update
|
|
||||||
working-directory: ${{ matrix.os }}
|
working-directory: ${{ matrix.os }}
|
||||||
|
|
||||||
- name: Run prebuild
|
- name: Run prebuild
|
||||||
run: bash prebuild.sh
|
run: ./scripts/prebuild.sh
|
||||||
|
|
||||||
- name: Build and deploy
|
- name: Build and deploy
|
||||||
env:
|
env:
|
||||||
@@ -81,5 +77,5 @@ jobs:
|
|||||||
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
|
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
|
||||||
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
|
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
|
||||||
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
|
APPLE_KEY_CONTENT: ${{ secrets.APPLE_KEY_CONTENT }}
|
||||||
run: bundle exec fastlane release
|
run: ../scripts/build-release.sh
|
||||||
working-directory: ${{ matrix.os }}
|
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