Skip to content

Commit

Permalink
feat: done actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zmhu committed Sep 20, 2023
1 parent 104d882 commit 61a10cf
Show file tree
Hide file tree
Showing 7 changed files with 206 additions and 144 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CHANNEL=prod
CHANNEL=site
9 changes: 5 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ jobs:
include:
# - target: aarch64-apple-darwin
# platform: macos-latest
# - target: x86_64-apple-darwin
# platform: macos-latest
- target: x86_64-apple-darwin
platform: macos-latest
# - target: x86_64-unknown-linux-gnu
# platform: ubuntu-20.04
- target: x86_64-pc-windows-msvc
platform: windows-latest
# - target: x86_64-pc-windows-msvc
# platform: windows-latest

runs-on: ${{ matrix.platform }}
steps:
Expand Down Expand Up @@ -71,6 +71,7 @@ jobs:
if [ ! -d "releases" ]; then
mkdir releases
fi
flutter config --enable-windows-desktop
flutter build windows --release
cp build/windows/runner/Release/GeekChat.exe releases/GeekChat.exe
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ samples, guidance on mobile development, and a full API reference.
flutter pub run build_runner build
```

### build

build with [Flutter Distributor](https://distributor.leanflutter.org/docs/makers/dmg)

```
dart pub global activate flutter_distributor
export PATH="$PATH":"$HOME/.pub-cache/bin"
```

```
yarn global add appdmg
# or
npm install -g appdmg
```

```
flutter_distributor release --name release
```

### Docs
- https://isar.dev/zh/recipes/string_ids.html
- https://codewithandrea.com/articles/flutter-responsive-layouts-split-view-drawer-navigation/
Expand Down
35 changes: 35 additions & 0 deletions distribute_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# variables:
# PGYER_API_KEY: "your api key"
output: dist/
releases:
- name: release
jobs:
# Build and publish your apk pkg to pgyer
# - name: release-dev-android
# package:
# platform: android
# target: apk
# build_args:
# # target-platform: android-arm,android-arm64
# dart-define:
# APP_ENV: release
- name: macos-release
package:
platform: macos
target: dmg
build_args:
dart-define:
APP_ENV: release


# publish_to: pgyer
# Build and publish your ipa pkg to pgyer
# - name: release-dev-ios
# package:
# platform: ios
# target: ipa
# build_args:
# export-options-plist: ios/dev_ExportOptions.plist
# dart-define:
# APP_ENV: dev
# publish_to: pgyer
10 changes: 10 additions & 0 deletions macos/packaging/dmg/make_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: GeekChat
contents:
- x: 448
y: 344
type: link
path: "/Applications"
- x: 192
y: 344
type: file
path: Geek Chat.app
Loading

0 comments on commit 61a10cf

Please sign in to comment.