release(dev): v1.3.4 #71
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_zip: | ||
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-zip-artifact | ||
path: windows.zip | ||
deploy_windows_installer: | ||
name: Windows App Installer | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
- name: Get Flutter | ||
uses: subosito/flutter-action@v2 | ||
- name: Build Windows App | ||
run: | | ||
flutter config --enable-windows-desktop | ||
flutter build windows | ||
- name: Build iss script | ||
run: dart run inno_bundle:build --no-app --release --no-installer | ||
- name: Output config into github output | ||
id: envs | ||
# thanks to https://github.com/actions/runner/issues/2224#issuecomment-1289925992 | ||
run: echo $(dart run inno_bundle:build --envs --no-hf) | Out-File -FilePath $Env:GITHUB_OUTPUT -Encoding utf8 -Append | ||
- name: Build installer | ||
uses: Minionguyjpro/[email protected] | ||
with: | ||
path: ./build/windows/x64/installer/Release/inno-script.iss | ||
- name: upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: windows-installer-artifact | ||
path: ./build/windows/x64/installer/Release/${{ steps.envs.outputs.APP_NAME_CAMEL_CASE }}-x86_64-${{ steps.envs.outputs.APP_VERSION }}-Installer.exe | ||
github_release: | ||
name: Create GitHub Release | ||
needs: [deploy_android, deploy_ios, deploy_windows_zip, deploy_windows_installer] | ||
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: Download Windwos Zip Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: windows-zip-artifact | ||
- name: Download Windwos Installer Artifact | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: windows-installer-artifact | ||
- name: Upload Release Windwos Zip 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 | ||
- name: Upload Release Windwos Installer Asset | ||
id: upload-release-asset | ||
Check failure on line 264 in .github/workflows/cd.yml GitHub Actions / Store CDInvalid workflow file
|
||
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: ${{ steps.envs.outputs.APP_NAME_CAMEL_CASE }}-x86_64-${{ steps.envs.outputs.APP_VERSION }}-Installer.exe | ||
asset_name: ${{ steps.envs.outputs.APP_NAME_CAMEL_CASE }}-x86_64-${{ steps.envs.outputs.APP_VERSION }}-Installer.exe |