release: v1.4.2 #75
Workflow file for this run
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
name: Store CD | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
# CD | |
deploy_android: | |
name: Android Play Store | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17.0' | |
- name: Decrypt Android keys | |
run: sh ./.github/scripts/decrypt_android_keys.sh | |
env: | |
KEYS_SECRET_PASSPHRASE: ${{ secrets.KEYS_SECRET_PASSPHRASE }} | |
- name: Use JD | |
uses: r26d/jq-action@master | |
with: | |
cmd: jq -n env | |
- name: Generate changelog | |
run: bash ./.github/scripts/generate_android_changelog.sh | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.x' | |
channel: 'stable' | |
- name: Decrypt dev configs | |
run: sh ./scripts/decrypt_dev_configs.sh | |
env: | |
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }} | |
- name: Install Flutter dependencies | |
run: flutter pub get | |
- run: flutter build appbundle --release | |
- name: Setup ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.2' | |
- name: Bundle update | |
run: bundle update --bundler | |
working-directory: ./android | |
- name: Run Fastlane | |
uses: maierj/[email protected] | |
with: | |
lane: 'playstore' | |
subdirectory: 'android' | |
deploy_ios: | |
name: iOS Deploy TestFlight | |
runs-on: macos-13 | |
steps: | |
# Ensure the xcode version is available | |
- name: List Xcode installations | |
run: sudo ls -1 /Applications | grep "Xcode" | |
# Select your required version | |
- name: Select Xcode 15.0 | |
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.ref }} | |
- name: Decrypt iOS keys | |
run: sh ./.github/scripts/decrypt_ios_keys.sh | |
env: | |
KEYS_SECRET_PASSPHRASE: ${{ secrets.KEYS_SECRET_PASSPHRASE }} | |
- name: Generate changelog | |
run: bash ./.github/scripts/generate_ios_changelog.sh | |
- name: Run Flutter tasks | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.x' | |
channel: 'stable' | |
- name: Decrypt dev configs | |
run: sh ./scripts/decrypt_dev_configs.sh | |
env: | |
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }} | |
- run: flutter pub get | |
- run: flutter build ios --release --no-codesign | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '2.7.2' | |
- name: Bundle update | |
run: bundle update --bundler | |
working-directory: ./ios | |
- name: Deploy iOS Beta to TestFlight via Fastlane | |
uses: maierj/[email protected] | |
with: | |
lane: 'release' | |
subdirectory: 'ios' | |
env: | |
APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' | |
APP_STORE_CONNECT_APPLE_ID: '${{ secrets.APP_STORE_CONNECT_APPLE_ID }}' | |
APP_STORE_CONNECT_BUNDLE_IDENTIFIER: '${{ secrets.APP_STORE_CONNECT_BUNDLE_IDENTIFIER }}' | |
DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' | |
FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}' | |
FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}' | |
MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' | |
GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' | |
PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' | |
TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' | |
TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' | |
FIREBASE_CLI_TOKEN: '${{ secrets.FIREBASE_CLI_TOKEN }}' | |
GOOGLE_APP_ID: '${{ secrets.GOOGLE_APP_ID }}' | |
# deploy_macos: | |
# name: macOS Deploy TestFlight | |
# runs-on: macOS-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# with: | |
# ref: ${{ github.ref }} | |
# - name: Decrypt macOS keys | |
# run: sh ./.github/scripts/decrypt_macos_keys.sh | |
# env: | |
# KEYS_SECRET_PASSPHRASE: ${{ secrets.KEYS_SECRET_PASSPHRASE }} | |
# - name: Run Flutter tasks | |
# uses: subosito/flutter-action@v2 | |
# with: | |
# channel: 'dev' | |
# - name: Decrypt dev configs | |
# run: sh ./scripts/decrypt_dev_configs.sh | |
# env: | |
# DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }} | |
# - name: Upgrades flutter | |
# run: flutter upgrade | |
# - name: Enable macOS | |
# run: flutter config --enable-macos-desktop | |
# - run: flutter pub get | |
# - run: cd ./macos && pod install | |
## - run: flutter build macos --release | |
# - uses: ruby/setup-ruby@v1 | |
# with: | |
# ruby-version: '2.7.2' | |
# - name: Bundle update | |
# run: bundle update --bundler | |
# working-directory: ./ios | |
# - name: Deploy macOS Beta to TestFlight via Fastlane | |
# uses: maierj/[email protected] | |
# with: | |
# lane: 'release' | |
# subdirectory: 'macos' | |
# env: | |
# APP_STORE_CONNECT_TEAM_ID: '${{ secrets.APP_STORE_CONNECT_TEAM_ID }}' | |
# DEVELOPER_APP_ID: '${{ secrets.DEVELOPER_APP_ID }}' | |
# DEVELOPER_APP_IDENTIFIER: '${{ secrets.DEVELOPER_APP_IDENTIFIER }}' | |
# DEVELOPER_PORTAL_TEAM_ID: '${{ secrets.DEVELOPER_PORTAL_TEAM_ID }}' | |
# FASTLANE_APPLE_ID: '${{ secrets.FASTLANE_APPLE_ID }}' | |
# FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD: '${{ secrets.FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD }}' | |
# MATCH_PASSWORD: '${{ secrets.MATCH_PASSWORD }}' | |
# GIT_AUTHORIZATION: '${{ secrets.GIT_AUTHORIZATION }}' | |
# PROVISIONING_PROFILE_SPECIFIER: '${{ secrets.PROVISIONING_PROFILE_SPECIFIER }}' | |
# TEMP_KEYCHAIN_PASSWORD: '${{ secrets.TEMP_KEYCHAIN_PASSWORD }}' | |
# TEMP_KEYCHAIN_USER: '${{ secrets.TEMP_KEYCHAIN_USER }}' | |
deploy_windows: | |
name: Windows App | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Run Flutter tasks | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.x' | |
channel: 'stable' | |
- name: Decrypt dev configs | |
run: sh ./scripts/decrypt_dev_configs.sh | |
env: | |
DEV_CONFIGS_PASSPHRASE: ${{ secrets.DEV_CONFIGS_PASSPHRASE }} | |
- name: Upgrades flutter | |
run: flutter upgrade | |
- name: Enable windows | |
run: flutter config --enable-windows-desktop | |
- run: flutter doctor -v | |
- run: flutter pub get | |
- name: Build windows | |
run: flutter build windows --release | |
- name: 'Zip files' | |
run: powershell Compress-Archive build\windows\x64\runner\Release\ windows.zip | |
- name: upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-artifact | |
path: windows.zip | |
github_release: | |
name: Create GitHub Release | |
needs: [deploy_android, deploy_ios, deploy_windows] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body_path: RELEASE_NOTE.md | |
draft: false | |
prerelease: false | |
- name: Use Download Artifact v2 | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-artifact | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps | |
asset_path: ./windows.zip | |
asset_name: nsysu_ap_windows.zip | |
asset_content_type: application/zip |