Skip to content

Commit

Permalink
Window Installer
Browse files Browse the repository at this point in the history
  • Loading branch information
quocbao238 committed Jun 3, 2023
1 parent e1f7b98 commit 990f439
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 96 deletions.
82 changes: 41 additions & 41 deletions .github/workflows/android-release.yml
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
name: Android Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: 'gradle'

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.2"
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter --disable-telemetry && flutter pub get && flutter doctor || true

- name: Get dependencies example app
working-directory: example
run: flutter pub get

- name: Start release build
working-directory: example
run: flutter build apk --release

- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: Android - Release
path: example/build/app/outputs/apk/release/app-release.apk

#name: Android Release
#
#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
#jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# distribution: 'zulu'
# java-version: "12.x"
# cache: 'gradle'
#
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: "3.10.2"
# channel: 'stable'
# cache: true
# - name: Get dependencies
# run: flutter --disable-telemetry && flutter pub get && flutter doctor || true
#
# - name: Get dependencies example app
# working-directory: example
# run: flutter pub get
#
# - name: Start release build
# working-directory: example
# run: flutter build apk --release
#
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v2
# with:
# name: Android - Release
# path: example/build/app/outputs/apk/release/app-release.apk
#
94 changes: 47 additions & 47 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
# Support build dmg macos
name: Macos Release

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: "12.x"
cache: 'gradle'

- uses: subosito/flutter-action@v2
with:
flutter-version: "3.10.2"
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter --disable-telemetry && flutter pub get && flutter doctor || true

- name: Get dependencies example app
working-directory: example
run: flutter pub get

- name: Start release build
working-directory: example
run: flutter build macos --release


- name: Install app-dmg & Create dmg file
working-directory: example
run: npm install -g appdmg && appdmg installers/dmg_creator/config.json installers/dmg_creator/flutter_m3.dmg


- name: Upload a Build Artifact
uses: actions/upload-artifact@v2
with:
name: Macos - Release
path: example/installers/dmg_creator/flutter_m3.dmg
## Support build dmg macos
#name: Macos Release
#
#on:
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
#
#jobs:
# build:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-java@v3
# with:
# distribution: 'zulu'
# java-version: "12.x"
# cache: 'gradle'
#
# - uses: subosito/flutter-action@v2
# with:
# flutter-version: "3.10.2"
# channel: 'stable'
# cache: true
# - name: Get dependencies
# run: flutter --disable-telemetry && flutter pub get && flutter doctor || true
#
# - name: Get dependencies example app
# working-directory: example
# run: flutter pub get
#
# - name: Start release build
# working-directory: example
# run: flutter build macos --release
#
#
# - name: Install app-dmg & Create dmg file
# working-directory: example
# run: npm install -g appdmg && appdmg installers/dmg_creator/config.json installers/dmg_creator/flutter_m3.dmg
#
#
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v2
# with:
# name: Macos - Release
# path: example/installers/dmg_creator/flutter_m3.dmg
35 changes: 27 additions & 8 deletions .github/workflows/window_release.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Support build window
name: Window Release
name: Window Installer

on:
push:
Expand Down Expand Up @@ -28,14 +27,34 @@ jobs:

- name: Get dependencies example app
working-directory: example
run: flutter pub get
run: flutter pub get```

- name: Start release build
- name: Install NSIS
run: choco install nsis -y # If using Chocolatey, or use an alternative method to install NSIS

- name: Create Installer
run: |
set -e
cp path/to/your/app.exe app.exe
cp path/to/your/installer.nsi installer.nsi
makensis installer.nsi
- name: Start build
working-directory: example
run: flutter build windows --release
run: flutter build windows

- name: Upload a Build Artifact
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: Window - Release
path: example/build/outputs/windows/Release/example.exe
name: app
path: |
build/windows/
app.exe
FlutterM3Core.exe
#
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v2
# with:
# name: Window - Release
# path: example/build/outputs/windows/Release/example.exe

0 comments on commit 990f439

Please sign in to comment.