mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-23 18:58:29 +03:00
67 lines
1.6 KiB
YAML
67 lines
1.6 KiB
YAML
name: Linux
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-18.04, ubuntu-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: |
|
|
sudo apt-get update
|
|
sudo apt-get install -qq swig libpcsclite-dev clang cmake ninja-build pkg-config libgtk-3-dev
|
|
python -m pip install --upgrade pip
|
|
pip install poetry
|
|
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: 'stable'
|
|
- run: flutter config --enable-linux-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 linux
|
|
|
|
- name: Check generated files
|
|
run: git diff --exit-code
|
|
|
|
- name: Rename and archive app
|
|
run: |
|
|
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
|
|
mkdir deploy
|
|
mv resources/com.yubico.authenticator.desktop build/linux/x64/release/bundle
|
|
mv resources/icons/com.yubico.yubioath.png build/linux/x64/release/bundle
|
|
mv resources/README.adoc build/linux/x64/release/bundle
|
|
tar -czf deploy/yubioath-desktop-${REF}-linux-${{matrix.os}}.tar.gz -C build/linux/x64/release/bundle .
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: yubioath-desktop-linux
|
|
path: deploy
|