Skip to content

Commit

Permalink
add github actions for linux and mac
Browse files Browse the repository at this point in the history
  • Loading branch information
molihuan committed Nov 20, 2023
1 parent 3871056 commit 1d584dd
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release_android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/[email protected]
with:
# Artifact name
name: release-android
name: release-android.zip
# 导出文件夹
path: build/app/outputs/flutter-apk/
# The desired behavior if no files are found using the provided path.
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/release_linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Linux
on:
# 手动触发
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
# 使用本项目
- uses: actions/checkout@v3

#设置flutter
- uses: subosito/[email protected]
with:
# The Flutter version to make available on the path
flutter-version: 3.13.9
# The Flutter build release channel
channel: # optional, default is stable

# Get flutter dependencies.
- run: flutter pub get
# Build apk.打包各架构版本
- run: flutter build linux --release
# Upload generated apk to the artifacts.
- uses: actions/[email protected]
with:
# Artifact name
name: release-linux.tar.gz
# 导出文件夹
path: build/linux/runner/Release/
# The desired behavior if no files are found using the provided path.

33 changes: 33 additions & 0 deletions .github/workflows/release_mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release Mac
on:
# 手动触发
workflow_dispatch:
jobs:
build:
name: Build
runs-on: macos-latest
steps:
# 使用本项目
- uses: actions/checkout@v3

#设置flutter
- uses: subosito/[email protected]
with:
# The Flutter version to make available on the path
flutter-version: 3.13.9
# The Flutter build release channel
channel: # optional, default is stable

# Get flutter dependencies.
- run: flutter pub get
# Build apk.打包各架构版本
- run: flutter build macos --release
# Upload generated apk to the artifacts.
- uses: actions/[email protected]
with:
# Artifact name
name: release-mac.tar.gz
# 导出文件夹
path: build/mac/Build/Products/Release/
# The desired behavior if no files are found using the provided path.

4 changes: 2 additions & 2 deletions .github/workflows/release_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
jobs:
build:
name: Build
runs-on: windows-latest
runs-on: windows-2019
steps:
# 使用本项目
- uses: actions/checkout@v3
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- uses: actions/[email protected]
with:
# Artifact name
name: release-windows
name: release-windows.zip
# 导出文件夹
path: build/windows/runner/Release/
# The desired behavior if no files are found using the provided path.
Expand Down

0 comments on commit 1d584dd

Please sign in to comment.