Skip to content

Commit

Permalink
Fix workflows (#5)
Browse files Browse the repository at this point in the history
* Fix workflows

* Fix GithubToken

* Fix workflow

* Fix Workflow

* Fix Workflow

* Test AppVersion

* Test AppVersion

* Test AppVersion

* Test AppVersion

* Fix workflow

* Fix workflow

* Fix workflow

* Add Windows

* Add MacOs

* Fix workflows
  • Loading branch information
rohitsangwan01 committed Jul 7, 2024
1 parent d235f9d commit 3c062c9
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 11 deletions.
53 changes: 47 additions & 6 deletions .github/workflows/release_builds.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Available Runners: https://github.com/actions/runner-images?tab=readme-ov-file#available-images
name: Release App
on:
workflow_dispatch:

jobs:
# Runs on Linux x64
linux:
runs-on: ubuntu-22.04
steps:
Expand All @@ -12,14 +14,53 @@ jobs:
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-0 libgtk-3-dev libblkid1 liblzma5
- name: Enable Linux
run: flutter config --enable-linux-desktop
- name: Get Dependencies
run: flutter pub get
- name: Generate App Version
id: app_version
run: echo "value=$(yq '.version' pubspec.yaml)" >> $env:GITHUB_OUTPUT
- name: Activate Packaging Tool
run: dart pub global activate flutter_distributor
- name: Release App
run: flutter_distributor release --name dev --jobs linux
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter_distributor release --name publish --jobs linux

# Runs on Windows x64
windows:
runs-on: windows-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Apply Flutter Environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Enable Windows
run: flutter config --enable-windows-desktop
- name: Activate Packaging Tool
run: dart pub global activate flutter_distributor
- name: Release App
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter_distributor release --name publish --jobs windows

# Runs on Macos Arm64
macos:
runs-on: macos-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
- name: Install appdmg
run: npm install -g appdmg
- name: Apply Flutter Environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Enable MacOS
run: flutter config --enable-macos-desktop
- name: Activate Packaging Tool
run: dart pub global activate flutter_distributor
- name: Release App
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: flutter_distributor release --name publish --jobs macos
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"cSpell.words": [
"altsetting",
"Appcast",
"appdmg",
"assistivetouch",
"backsapce",
"calloc",
Expand All @@ -16,6 +17,8 @@
"libcrypto",
"libgtk",
"libusb",
"marvinpinto",
"mikefarah",
"nullptr",
"oneplus",
"softprops",
Expand Down
24 changes: 20 additions & 4 deletions distribute_options.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
# export GITHUB_TOKEN="personal access token"
# flutter_distributor release --name dev
# flutter_distributor release --name bundle
output: dist/
artifact_name: '{{name}}-{{version}}-{{platform}}.{{ext}}'
releases:
- name: dev
## Only Build Locally
- name: bundle
jobs:
- name: macos
package:
platform: macos
target: dmg
- name: windows
package:
platform: windows
target: exe
- name: linux
package:
platform: linux
target: deb
## Build and publish to github
- name: publish
jobs:
- name: macos
package:
Expand Down Expand Up @@ -30,4 +46,4 @@ releases:
target: github
args:
repo-owner: rohitsangwan01
repo-name: uni_control_hub
repo-name: uni_control_hub
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: uni_control_hub
version: 0.0.2+2
version: 0.0.2
publish_to: none
description: Seamlessly Bridge Your Devices
environment:
Expand Down

0 comments on commit 3c062c9

Please sign in to comment.