release: v3.10.4 #74
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*" | |
workflow_dispatch: | |
jobs: | |
# CD | |
deploy_android: | |
name: Android Play Store | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- 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.13.x' | |
channel: 'stable' | |
- 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@v2 | |
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.13.x' | |
channel: 'stable' | |
- 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 }}' | |
# deploy_web: | |
# name: Web Firebase Hosting | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v2 | |
# - uses: subosito/flutter-action@v2 | |
# with: | |
# flutter-version: '3.13.x' | |
# channel: 'stable' | |
# - name: Enable Web | |
# run: flutter config --enable-web | |
# - run: flutter pub get | |
# - name: Build Web | |
# run: flutter build web | |
# - name: Deploy to Firebase | |
# uses: w9jds/firebase-action@master | |
# with: | |
# args: deploy --only hosting | |
# env: | |
# FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} | |
# PROJECT_ID: nkust-ap-flutter | |
deploy_windows: | |
name: Windows App | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run Flutter tasks | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.13.x' | |
channel: 'stable' | |
- 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\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@v2 | |
- 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: nkust_ap_windows.zip | |
asset_content_type: application/zip |