2021-11-19 11:22:27 +03:00
|
|
|
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'
|
|
|
|
|
2022-05-13 11:46:36 +03:00
|
|
|
- name: Check app versions
|
|
|
|
run: |
|
|
|
|
python set-version.py
|
|
|
|
git diff --exit-code
|
|
|
|
|
2021-11-19 11:22:27 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
brew update
|
|
|
|
brew install swig
|
|
|
|
python -m pip install --upgrade pip
|
|
|
|
pip install poetry
|
|
|
|
|
2022-04-27 15:42:05 +03:00
|
|
|
- uses: subosito/flutter-action@v2
|
2021-11-19 11:22:27 +03:00
|
|
|
with:
|
2022-05-12 09:36:47 +03:00
|
|
|
channel: 'stable'
|
2022-04-20 17:27:14 +03:00
|
|
|
architecture: 'x64'
|
2021-11-19 11:22:27 +03:00
|
|
|
- run: flutter config --enable-macos-desktop
|
|
|
|
- run: flutter --version
|
|
|
|
|
2021-11-19 12:23:01 +03:00
|
|
|
- name: Run tests
|
2021-11-19 13:20:57 +03:00
|
|
|
run: |
|
|
|
|
flutter test
|
|
|
|
flutter analyze
|
2021-11-19 12:23:01 +03:00
|
|
|
|
2022-05-06 17:31:46 +03:00
|
|
|
- name: Build the Helper
|
|
|
|
run: ./build-helper.sh
|
2021-11-19 11:22:27 +03:00
|
|
|
|
|
|
|
- name: Build the app
|
2021-11-19 12:23:01 +03:00
|
|
|
run: flutter build macos
|
2021-11-19 11:22:27 +03:00
|
|
|
|
2022-04-04 16:43:04 +03:00
|
|
|
- name: Check generated files
|
|
|
|
run: git diff --exit-code
|
|
|
|
|
2022-06-23 15:31:36 +03:00
|
|
|
- name: Create dmg
|
|
|
|
run: |
|
|
|
|
brew install create-dmg
|
|
|
|
mkdir source_folder
|
|
|
|
cp -R build/macos/Build/Products/Release/"Yubico Authenticator.app" source_folder
|
2022-06-28 16:47:19 +03:00
|
|
|
sh create-dmg.sh
|
2022-06-23 15:31:36 +03:00
|
|
|
|
2021-11-19 11:22:27 +03:00
|
|
|
- name: Rename and archive app bundle
|
|
|
|
run: |
|
|
|
|
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
|
|
|
|
mkdir deploy
|
2022-06-23 15:31:36 +03:00
|
|
|
mv yubioath-desktop.dmg deploy
|
2022-01-26 12:51:21 +03:00
|
|
|
tar -czf deploy/yubioath-desktop-${REF}.app.tar.gz -C build/macos/Build/Products/Release "Yubico Authenticator.app"
|
2021-11-19 11:22:27 +03:00
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-artifact@v1
|
|
|
|
with:
|
|
|
|
name: yubioath-desktop-macos
|
|
|
|
path: deploy
|