Skip to content

Commit

Permalink
Correct github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Henri Cook committed Jul 21, 2024
1 parent 30d3c95 commit b3d21d0
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 32 deletions.
72 changes: 40 additions & 32 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,60 +6,68 @@ on:
- main

jobs:
build:
build-linux:
runs-on: ubuntu-latest

strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 'stable'

- name: Enable desktop platforms
run: |
flutter config --enable-macos-desktop
flutter config --enable-windows-desktop
flutter config --enable-linux-desktop
channel: stable
cache: true

- name: Install dependencies
run: flutter pub get

- name: Build for macOS
if: matrix.os == 'macos-latest'
run: flutter build macos --release
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Build for Windows
if: matrix.os == 'windows-latest'
run: flutter build windows --release
- run: flutter pub get
- run: flutter build linux

- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: flutter build linux --release
- name: Upload Linux build artifacts
uses: actions/upload-artifact@v4
with:
name: linux-release
path: build/linux/x64/release/

build-macos:
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter build macos
- name: Upload macOS build artifacts
if: matrix.os == 'macos-latest'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: macos-release
path: build/macos/Build/Products/Release/

build-windows:
runs-on: windows-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter build windows
- name: Upload Windows build artifacts
if: matrix.os == 'windows-latest'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: windows-release
path: build/windows/runner/Release/

- name: Upload Linux build artifacts
if: matrix.os == 'ubuntu-latest'
uses: actions/upload-artifact@v2
with:
name: linux-release
path: build/linux/release/

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Contributions and improvements are welcome, open an `RFC: ` issue if you'd like
- Linux: `/home/<Username>/Documents`
3. Download the appropriate binary for your OS from the [Releases page]()

## Limitations
- If `data.json` isn't in the right place, or its malformed, the crash will be quick and unhandled.
- There's not really much error handling at all.

## Credit

### [OTPClient](https://github.com/paolostivanin/OTPClient)
Expand Down

0 comments on commit b3d21d0

Please sign in to comment.