v24.7.0 #197
Workflow file for this run
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
name: Release | |
on: | |
push: | |
tags: | |
- "v*" | |
workflow_dispatch: | |
jobs: | |
release-windows: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install NSIS (windows) | |
if: matrix.platform == 'windows-latest' | |
uses: mrquantumoff/[email protected] | |
with: | |
nsis-version: "3.10" | |
- name: Install flutter | |
uses: richardshiue/flutter-action@main | |
with: | |
channel: "stable" | |
- name: Generate locales | |
run: flutter gen-l10n | |
- name: Build on windows | |
if: matrix.platform == 'windows-latest' | |
continue-on-error: false | |
run: | | |
flutter clean | |
flutter pub get | |
flutter build windows --release --split-debug-info --obfuscate --dart-define QUADRANT_OAUTH2_CLIENT_SECRET=${{secrets.CLIENT_SECRET}} --dart-define QUADRANT_OAUTH2_CLIENT_ID=${{secrets.CLIENT_ID}} --dart-define QUADRANT_QNT_API_KEY=${{ secrets.QUADRANT_QNT_API_KEY_WINDOWS }} --dart-define ETERNAL_API_KEY='${{ secrets.ETERNAL_API_KEY }}' | |
makensis .\setup.nsi | |
dart run msix:create -v --output-path windows-build --build-windows false | |
- name: Compress Windows build to .zip | |
if: matrix.platform == 'windows-latest' | |
uses: vimtor/[email protected] | |
with: | |
files: ./build/windows/x64/runner/Release | |
recursive: true | |
dest: WindowsBuild.zip | |
- name: Upload the Windows MSIX package and .zip build and the NSIS build | |
if: matrix.platform == 'windows-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
./WindowsBuild.zip | |
./windows-build/quadrant.msix | |
./QuadrantSetup.exe | |
release-linux: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest] | |
runs-on: ${{matrix.platform}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Generate locales | |
run: flutter gen-l10n | |
- name: Build on Linux | |
if: matrix.platform == 'ubuntu-latest' | |
run: | | |
sudo apt update | |
sudo apt install meson clang build-essential cmake curl file git unzip xz-utils zip libglu1-mesa ninja-build pkg-config libgtk-3-dev | |
flutter clean | |
flutter pub get | |
flutter build linux --release --split-debug-info --obfuscate --dart-define QUADRANT_OAUTH2_CLIENT_SECRET='${{secrets.CLIENT_SECRET}}' --dart-define QUADRANT_OAUTH2_CLIENT_ID='${{secrets.CLIENT_ID}}' --dart-define QUADRANT_QNT_API_KEY='${{secrets.QUADRANT_QNT_API_KEY}}' --dart-define ETERNAL_API_KEY='${{ secrets.ETERNAL_API_KEY }}' | |
tar -czvf GNULinuxBuild.tar.gz ./build/linux/x64/release/bundle | |
- name: Upload the GNU/Linux build | |
if: matrix.platform == 'ubuntu-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
GNULinuxBuild.tar.gz | |
release-macos: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [macos-latest] | |
runs-on: ${{matrix.platform}} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "stable" | |
- name: Generate locales | |
run: flutter gen-l10n | |
- name: Build on macOS | |
if: matrix.platform == 'macos-latest' | |
run: | | |
flutter pub get | |
flutter build macos --release --split-debug-info --obfuscate --dart-define QUADRANT_OAUTH2_CLIENT_SECRET='${{secrets.CLIENT_SECRET}}' --dart-define QUADRANT_OAUTH2_CLIENT_ID='${{secrets.CLIENT_ID}}' --dart-define QUADRANT_QNT_API_KEY='${{secrets.QUADRANT_QNT_API_KEY}}' --dart-define ETERNAL_API_KEY='${{ secrets.ETERNAL_API_KEY }}' | |
tar -czvf macOSBuild.tar.gz build/macos/Build/Products/Release/Quadrant.app | |
# For future use | |
# pkgbuild --install-location /Applications --component "./build/macos/Build/Products/Release/Minecraft Modpack Manager Reborn.app" ./mcmodpackmanagerMacOS.pkg --identifier dev.mrquantumoff.mcmodpackmanager | |
- name: Upload the macOS build | |
if: matrix.platform == 'macos-latest' | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: | | |
macOSBuild.tar.gz | |
LICENSE |