Skip to content

Fix (#14)

Fix (#14) #163

Workflow file for this run

name: Flutter CI
on:
push:
pull_request:
jobs:
build-and-release-linux:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install dependencies
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build linux --release
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: EnjinWalletDaemon-${{github.ref_name}}-linux
path: build/linux/x64/release/bundle
retention-days: 2
- name: Archive Release
uses: thedoctor0/zip-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
type: 'zip'
filename: EnjinWalletDaemon-${{github.ref_name}}-linux.zip
directory: build/linux/x64/release/bundle
- name: Linux Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/linux/x64/release/bundle/EnjinWalletDaemon-${{github.ref_name}}-linux.zip
build-and-release-windows:
runs-on: windows-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build windows --release
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/')
with:
name: EnjinWalletDaemon-${{github.ref_name}}-windows
path: build/windows/x64/runner/Release
retention-days: 2
- name: Archive Release
uses: thedoctor0/zip-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
type: 'zip'
filename: EnjinWalletDaemon-${{github.ref_name}}-windows.zip
directory: build/windows/x64/runner/Release
- name: Windows Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/windows/x64/runner/Release/EnjinWalletDaemon-${{github.ref_name}}-windows.zip
build-and-release-macos:
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Install project dependencies
run: flutter pub get
- name: Build artifacts
run: flutter build macos --release
- name: Build resolve Swift dependencies
run: xcodebuild -resolvePackageDependencies -workspace macos/Runner.xcworkspace -scheme Runner -configuration Release -arch "x86_64"
- name: Build xArchive
run: |
xcodebuild -workspace macos/Runner.xcworkspace -scheme Runner -configuration Release -arch "x86_64" -archivePath build-output/app.xcarchive clean archive
- name: Export app
run: xcodebuild -exportArchive -archivePath build-output/app.xcarchive -exportPath build-output/macos -exportOptionsPlist macos/ExportOptions.plist
- name: Create a dmg
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "Install create-dmg"
brew install create-dmg
cd build-output/macos
create-dmg \
--volname "enjin_wallet_daemon" \
--window-pos 200 120 \
--window-size 800 529 \
--icon-size 130 \
--text-size 14 \
--icon "enjin_wallet_daemon.app" 260 250 \
--hide-extension "enjin_wallet_daemon.app" \
--app-drop-link 540 250 \
--hdiutil-quiet \
"EnjinWalletDaemon-${{github.ref_name}}-macos.dmg" \
"enjin_wallet_daemon.app"
- name: Upload artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: actions/upload-artifact@v4
with:
name: EnjinWalletDaemon-${{github.ref_name}}-macos
path: build-output/macos/EnjinWalletDaemon-${{github.ref_name}}-macos.dmg
retention-days: 2
- name: macOS Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build-output/macos/EnjinWalletDaemon-${{github.ref_name}}-macos.dmg