-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0076850
commit 68825c6
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Build for Release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
TAG_NAME: | ||
description: 'Version (Tag Name)' | ||
required: true | ||
|
||
jobs: | ||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install system dependencies | ||
run: | | ||
sudo apt-get update -y | ||
sudo apt-get install -y ninja-build libgtk-3-dev | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.24.1' | ||
|
||
- name: Configure Flutter | ||
run: flutter config --enable-linux-desktop | ||
|
||
- name: Get dependencies | ||
run: flutter pub get | ||
|
||
- name: Build | ||
run: flutter build linux --release --dart-define=commit=${{ github.event.inputs.TAG_NAME }} | ||
|
||
- name: Prepare for upload | ||
run: | | ||
mkdir upload | ||
mv ./build/linux/x64/release/bundle/ ./upload/BlueMapGUI_${{ github.event.inputs.TAG_NAME }}_Linux_x64/ | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "BlueMapGUI_${{ github.event.inputs.TAG_NAME }}_Linux_x64.zip" | ||
path: './upload/' | ||
|
||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
flutter-version: '3.24.1' | ||
|
||
- name: Configure Flutter | ||
run: flutter config --enable-windows-desktop | ||
|
||
- name: Get dependencies | ||
run: flutter pub get | ||
|
||
- name: Build | ||
run: flutter build windows --release --dart-define=commit=${{ github.event.inputs.TAG_NAME }} | ||
|
||
- name: Prepare for upload | ||
run: | | ||
New-Item -Path . -Name "upload" -ItemType "directory" | ||
Move-Item -Path "./build/windows/x64/runner/Release/" -Destination "./upload/BlueMapGUI_${{ github.event.inputs.TAG_NAME }}_Windows_x64/" | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: "BlueMapGUI_${{ github.event.inputs.TAG_NAME }}_Windows_x64.zip" | ||
path: './upload/' |