Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add macOS build test #392

Merged
merged 18 commits into from
Mar 13, 2023
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 19 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -286,17 +286,8 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set Flutter version from FVM config file to environment variables
uses: kuhnroyal/flutter-fvm-config-action@v1

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
# Use format expected by FVM.
# Else this won't be recognized as an installed version when setting
# '.../flutter' as the FVM Flutter version cache folder.
cache-path: '${{ runner.tool_cache }}/flutter/:version:'
- name: Install Codemagic CLI Tools
run: pip3 install codemagic-cli-tools

- name: Setup signing
env:
@@ -306,22 +297,35 @@ jobs:
APP_STORE_CONNECT_KEY_IDENTIFIER: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_KEY_IDENTIFIER }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_ISSUER_ID }}
APP_STORE_CONNECT_PRIVATE_KEY: ${{ secrets.SHAREZONE_APP_STORE_CONNECT_PRIVATE_KEY }}
BUNDLE_ID: de.codingbrain.sharezone.app
run: |
keychain initialize
app-store-connect fetch-signing-files $(xcode-project detect-bundle-id) \
--platform IOS \
app-store-connect fetch-signing-files $BUNDLE_ID \
--platform MAC_OS \
--type MAC_APP_DEVELOPMENT \
--certificate-key=@env:CERTIFICATE_PRIVATE_KEY \
--create
app-store-connect list-certificates --type MAC_INSTALLER_DISTRIBUTION --save || \
app-store-connect create-certificate --type MAC_INSTALLER_DISTRIBUTION --save
keychain initialize
keychain add-certificates
xcode-project use-profiles

- name: Set Flutter version from FVM config file to environment variables
uses: kuhnroyal/flutter-fvm-config-action@v1

- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
# Use format expected by FVM.
# Else this won't be recognized as an installed version when setting
# '.../flutter' as the FVM Flutter version cache folder.
cache-path: '${{ runner.tool_cache }}/flutter/:version:'

- name: Build macOS app
run: |
flutter build macos \
-t lib/main_dev.dart
-t lib/main_prod.dart

# We are building for every PR a web preview, which will be deployed to
# Firebase Hosting. The link to the website will posted as comment (like: