mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-12-26 19:52:52 +03:00
70 lines
1.6 KiB
YAML
70 lines
1.6 KiB
YAML
name: macOS
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: macos-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
|
|
- name: Check app versions
|
|
run: |
|
|
python set-version.py
|
|
git diff --exit-code
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew update
|
|
brew install swig
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
architecture: 'x64'
|
|
- run: flutter config --enable-macos-desktop
|
|
- run: flutter --version
|
|
|
|
- name: Run tests
|
|
run: |
|
|
flutter test
|
|
flutter analyze
|
|
|
|
- name: Build the Helper
|
|
run: ./build-helper.sh
|
|
|
|
- name: Build the app
|
|
run: flutter build macos
|
|
|
|
- name: Check generated files
|
|
run: git diff --exit-code
|
|
|
|
- name: Create dmg
|
|
run: |
|
|
brew install create-dmg
|
|
mkdir source_folder
|
|
cp -R build/macos/Build/Products/Release/"Yubico Authenticator.app" source_folder
|
|
sh create-dmg.sh
|
|
|
|
- name: Rename and archive app bundle
|
|
run: |
|
|
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
|
|
mkdir deploy
|
|
mv yubioath-desktop.dmg deploy
|
|
tar -czf deploy/yubioath-desktop-${REF}.app.tar.gz -C build/macos/Build/Products/Release "Yubico Authenticator.app"
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: yubioath-desktop-macos
|
|
path: deploy
|