Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 15 additions & 4 deletions .github/workflows/build-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
build_type:
required: true
type: string
installer_name:
installer_base_name:
required: true
type: string

Expand All @@ -19,7 +19,7 @@ jobs:
contents: "read"
id-token: "write"
env:
BUILD_TYPE: ${{ inputs.build_type || '' }}
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
runs-on: macos-26
steps:
Expand Down Expand Up @@ -134,6 +134,16 @@ jobs:
echo "GOMOBILECACHE=$HOME/.cache/gomobile" >> "$GITHUB_ENV"
mkdir -p "$HOME/.cache/gomobile"

- name: Cache gomobile
uses: actions/cache@v4
timeout-minutes: 10
continue-on-error: true
with:
path: ~/.cache/gomobile
key: ${{ runner.os }}-gomobile-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomobile-

- name: Install dependencies (gomobile)
run: |
make install-android-deps
Expand All @@ -145,20 +155,21 @@ jobs:
env:
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
INSTALLER_NAME: ${{ inputs.installer_base_name }}
GOMOBILECACHE: ${{ env.GOMOBILECACHE }}

- name: Upload Android APK
uses: actions/upload-artifact@v4
with:
name: lantern-installer-apk
path: ${{ inputs.installer_name }}.apk
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.apk
retention-days: 2

- name: Upload Android AAB
uses: actions/upload-artifact@v4
with:
name: lantern-installer-aab
path: ${{ inputs.installer_name }}.aab
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.aab
retention-days: 2

- name: Upload mapping.txt
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
build_type:
required: true
type: string
installer_name:
installer_base_name:
required: true
type: string

Expand All @@ -19,7 +19,7 @@ jobs:
contents: "read"
id-token: "write"
env:
BUILD_TYPE: ${{ inputs.build_type || '' }}
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
runs-on: macos-15
steps:
Expand All @@ -35,6 +35,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true

- name: Install Flutter
uses: subosito/flutter-action@v2.19.0
Expand Down Expand Up @@ -118,18 +119,38 @@ jobs:
# Create ExportOptions.plist
echo "$EXPORT_OPTIONS" | base64 --decode > "$EXPORT_OPTIONS_PATH"

- name: Set gomobile cache dir
shell: bash
run: |
echo "GOMOBILECACHE=$HOME/.cache/gomobile" >> "$GITHUB_ENV"
mkdir -p "$HOME/.cache/gomobile"

- name: Cache gomobile
uses: actions/cache@v4
timeout-minutes: 10
continue-on-error: true
with:
path: ~/.cache/gomobile
key: ${{ runner.os }}-gomobile-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomobile-

- name: Install dependencies
run: make install-ios-deps
env:
GOMOBILECACHE: ${{ env.GOMOBILECACHE }}

- name: Build iOS release
run: make ios-release
env:
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
INSTALLER_NAME: ${{ inputs.installer_base_name }}
GOMOBILECACHE: ${{ env.GOMOBILECACHE }}

- name: Upload application
uses: actions/upload-artifact@v4
with:
name: lantern-installer-ipa
path: ${{ inputs.installer_name }}.ipa
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.ipa
retention-days: 2
25 changes: 21 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
build_type:
required: true
type: string
installer_name:
installer_base_name:
required: true
type: string

jobs:
build-linux:
env:
BUILD_TYPE: ${{ inputs.build_type || '' }}
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
runs-on: ubuntu-latest
steps:
Expand All @@ -32,6 +32,19 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true

- name: Cache Flutter dependencies
uses: actions/cache@v4
timeout-minutes: 5
continue-on-error: true
with:
path: |
~/.pub-cache
.dart_tool
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-flutter-

- name: Install Linux dependencies
run: |
Expand Down Expand Up @@ -81,17 +94,21 @@ jobs:

- name: Build Linux release
run: make linux-release
env:
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
INSTALLER_NAME: ${{ inputs.installer_base_name }}

- name: Upload Linux build
uses: actions/upload-artifact@v4
with:
name: lantern-installer-rpm
path: ${{ inputs.installer_name }}.rpm
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.rpm
retention-days: 2

- name: Upload Linux build
uses: actions/upload-artifact@v4
with:
name: lantern-installer-deb
path: ${{ inputs.installer_name }}.deb
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.deb
retention-days: 2
30 changes: 27 additions & 3 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
build_type:
required: true
type: string
installer_name:
installer_base_name:
required: true
type: string

Expand All @@ -21,7 +21,7 @@ jobs:
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
BUILD_TYPE: ${{ inputs.build_type || '' }}
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
runs-on: macos-15
steps:
Expand All @@ -37,6 +37,7 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true

- name: Cache Flutter dependencies
uses: actions/cache@v4
Expand Down Expand Up @@ -109,15 +110,38 @@ jobs:
- name: Enable Flutter Desktop Support
run: flutter config --enable-macos-desktop

- name: Set gomobile cache dir
shell: bash
run: |
echo "GOMOBILECACHE=$HOME/.cache/gomobile" >> "$GITHUB_ENV"
mkdir -p "$HOME/.cache/gomobile"

- name: Cache gomobile
uses: actions/cache@v4
timeout-minutes: 10
continue-on-error: true
with:
path: ~/.cache/gomobile
key: ${{ runner.os }}-gomobile-${{ hashFiles('**/go.mod', '**/go.sum') }}
restore-keys: |
${{ runner.os }}-gomobile-

- name: Install dependencies
run: make install-macos-deps
env:
GOMOBILECACHE: ${{ env.GOMOBILECACHE }}

- name: Build macOS release
run: make macos-release
env:
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
INSTALLER_NAME: ${{ inputs.installer_base_name }}
GOMOBILECACHE: ${{ env.GOMOBILECACHE }}

- name: Upload macOS installer
uses: actions/upload-artifact@v4
with:
name: lantern-installer-dmg
path: ${{ inputs.installer_name }}.dmg
path: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}.dmg
retention-days: 2
25 changes: 21 additions & 4 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
build_type:
required: true
type: string
installer_name:
installer_base_name:
required: true
type: string

Expand All @@ -18,7 +18,7 @@ jobs:
env:
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
BUILD_TYPE: ${{ inputs.build_type || '' }}
BUILD_TYPE: ${{ inputs.build_type }}
VERSION: ${{ inputs.version }}
permissions:
contents: "read"
Expand All @@ -37,6 +37,19 @@ jobs:
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
cache: true

- name: Cache Flutter dependencies
uses: actions/cache@v4
timeout-minutes: 5
continue-on-error: true
with:
path: |
~/.pub-cache
.dart_tool
key: ${{ runner.os }}-flutter-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
${{ runner.os }}-flutter-

- name: Install WebView2 Runtime
shell: pwsh
Expand Down Expand Up @@ -88,6 +101,8 @@ jobs:

- name: Build Windows release
shell: pwsh
env:
FULL_INSTALLER_NAME: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}
run: |
dart pub global activate flutter_distributor
make windows-release
Expand All @@ -98,7 +113,7 @@ jobs:
--build-dart-define=BUILD_TYPE=${{ env.BUILD_TYPE }} `
--build-dart-define=VERSION=${{ inputs.version }} `
--flutter-build-args=verbose
Move-Item "dist/$env:APP_VERSION/$env:APP_NAME-$env:APP_VERSION-windows-setup.exe" "${{ inputs.installer_name }}.exe"
Move-Item "dist/$env:APP_VERSION/$env:APP_NAME-$env:APP_VERSION-windows-setup.exe" "$env:FULL_INSTALLER_NAME.exe"

- name: Sign EXE with Azure Code Signing
uses: getlantern/trusted-signing-action@main
Expand All @@ -117,7 +132,9 @@ jobs:

- name: Upload Windows installer
uses: actions/upload-artifact@v4
env:
FULL_INSTALLER_NAME: ${{ inputs.installer_base_name }}${{ inputs.build_type != 'production' && format('-{0}', inputs.build_type) || '' }}
with:
name: lantern-installer-exe
path: ${{ inputs.installer_name }}.exe
path: ${{ env.FULL_INSTALLER_NAME }}.exe
retention-days: 2
Loading
Loading