Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publishing dmg for macos now #151

Merged
merged 5 commits into from
Mar 31, 2024
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
39 changes: 27 additions & 12 deletions .github/workflows/flutter_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
LINUX_BUILD_PATH: ${{ vars.LINUX_BUILD_PATH }}
MACOS_BUILD_PATH: ${{ vars.MACOS_BUILD_PATH }}
WINDOWS_BUILD_PATH: ${{ vars.WINDOWS_BUILD_PATH }}
MACOS_DMG_PATH: installers/dmg_creator

jobs:
release-android-and-linux:
Expand Down Expand Up @@ -102,16 +103,16 @@ jobs:

- name: Rename ANDROID APKs
run: |
mv ${{vars.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_ARM_V7A}} ${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V7A}}
mv ${{vars.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_ARM_V8A}} ${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V8A}}
mv ${{vars.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_x86_64}} ${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_x86_64}}
mv ${{ env.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_ARM_V7A}} ${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V7A}}
mv ${{ env.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_ARM_V8A}} ${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V8A}}
mv ${{ env.ANDROID_BUILD_PATH}}/${{env.ANDROID_APK_x86_64}} ${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_x86_64}}

- name: Linux Archive
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: ${{ env.LINUX_ZIP }}
directory: ${{ vars.LINUX_BUILD_PATH }}
directory: ${{ env.LINUX_BUILD_PATH }}

- name: Publish Android Release
uses: softprops/action-gh-release@v1
Expand All @@ -120,22 +121,23 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V7A}}
${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V8A}}
${{vars.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_x86_64}}
${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V7A}}
${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_ARM_V8A}}
${{ env.ANDROID_BUILD_PATH}}/Vernet-${{github.ref_name}}-${{env.ANDROID_APK_x86_64}}

- name: Publish Linux Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ vars.LINUX_BUILD_PATH }}/${{ env.LINUX_ZIP }}
files: ${{ env.LINUX_BUILD_PATH }}/${{ env.LINUX_ZIP }}

release-macos:
runs-on: macos-latest
env:
MACOS_ZIP: Vernet-${{github.ref_name}}-macos.zip
MACOS_DMG: Vernet-${{github.ref_name}}-macos.dmg
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -162,16 +164,29 @@ jobs:
with:
type: 'zip'
filename: ${{ env.MACOS_ZIP }}
directory: ${{ vars.MACOS_BUILD_PATH }}
directory: ${{ env.MACOS_BUILD_PATH }}
path: vernet.app

- name: Install Node 18
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Appdmg and Create dmg
working-directory: ${{ env.MACOS_DMG_PATH }}
run: |
npm install -g appdmg
appdmg ./config.json ./${{ env.MACOS_DMG }}

- name: Publish macOS Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ vars.MACOS_BUILD_PATH }}/${{ env.MACOS_ZIP }}
files: |
${{ env.MACOS_BUILD_PATH }}/${{ env.MACOS_ZIP }}
${{ env.MACOS_DMG_PATH }}/${{ env.MACOS_DMG }}

release-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -203,7 +218,7 @@ jobs:
with:
type: 'zip'
filename: ${{ env.WINDOWS_ZIP }}
directory: ${{ vars.WINDOWS_BUILD_PATH }}
directory: ${{ env.WINDOWS_BUILD_PATH }}
path: vernet.exe

- name: Publish Windows Release
Expand All @@ -212,4 +227,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: ${{ vars.WINDOWS_BUILD_PATH }}/${{ env.WINDOWS_ZIP }}
files: ${{ env.WINDOWS_BUILD_PATH }}/${{ env.WINDOWS_ZIP }}
73 changes: 68 additions & 5 deletions .github/workflows/flutter_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
android: ${{ steps.filter.outputs.android }}
linux: ${{ steps.filter.outputs.linux }}
macos: ${{ steps.filter.outputs.macos }}
yaml: ${{ steps.filter.outputs.yaml }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: dorny/paths-filter@v3
Expand All @@ -39,11 +40,13 @@ jobs:
- 'linux/**'
macos:
- 'macos/**'
yaml:
- '*.yaml'

android-linux-build:
name: 'Android / Linux Build'
needs: changes
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' }}
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down Expand Up @@ -93,14 +96,74 @@ jobs:
- name: Run tests
run: flutter test
- name: Build Android
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true'}}
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.android == 'true' || needs.changes.outputs.yaml == 'true' }}
run: |
flutter build apk --debug --flavor dev

# Run only if test, lib, and linux folder is changed
- name: Install Linux dependencies
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true'}}
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }}
run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Build Linux
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true'}}
run: flutter build linux
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.linux == 'true' || needs.changes.outputs.yaml == 'true' }}
run: flutter build linux

macos-build:
name: 'Macos Build'
needs: changes
if: ${{ needs.changes.outputs.lib == 'true' || needs.changes.outputs.test == 'true' || needs.changes.outputs.macos == 'true' || needs.changes.outputs.yaml == 'true' }}
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Flutter action
uses: subosito/[email protected]
with:
channel: stable

- name: Flutter version
run: flutter --version

- name: Cache pubspec dependencies
uses: actions/[email protected]
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
restore-keys: |
build-pubspec-
- name: Cache build runner
uses: actions/cache@v2
with:
path: |
**/.dart_tool
**/*.g.dart
**/*.mocks.dart
**/*.config.dart
key: build-runner-${{ hashFiles('**/asset_graph.json', '**/*.dart', '**/pubspec.lock', '**/outputs.json') }}
restore-keys: |
build-runner-

- name: Download pub dependencies
run: flutter pub get

- name: Upgrade pub dependencies
run: flutter pub upgrade

- name: Run build_runner
run: flutter pub run build_runner build --delete-conflicting-outputs

- name: Run analyzer
run: flutter analyze

- name: Run tests
run: flutter test

- name: Build macos release
run: flutter build macos

2 changes: 2 additions & 0 deletions android/fastlane/metadata/android/en-US/changelogs/21.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Minor bug fixes and improvments.
Publishing dmg for macos now.
2 changes: 2 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/21.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Minor bug fixes and improvments.
Publishing dmg for macos now.
Binary file added installers/dmg_creator/AppIcon.icns
Binary file not shown.
8 changes: 8 additions & 0 deletions installers/dmg_creator/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"title": "Vernet",
"icon": "AppIcon.icns",
"contents": [
{ "x": 448, "y": 344, "type": "link", "path": "/Applications" },
{ "x": 192, "y": 344, "type": "file", "path": "../../build/macos/Build/Products/Release/vernet.app" }
]
}
2 changes: 1 addition & 1 deletion ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '11.0'
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
Expand Down
37 changes: 28 additions & 9 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
PODS:
- external_app_launcher (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_icmp_ping (0.0.1):
- Flutter
- flutter_isolate (0.0.1):
- Flutter
- network_info_plus (0.0.1):
- Flutter
- nsd_ios (0.0.1):
- Flutter
- package_info_plus (0.4.5):
- Flutter
- permission_handler_apple (9.1.1):
- path_provider_foundation (0.0.1):
- Flutter
- FlutterMacOS
- permission_handler_apple (9.3.0):
- Flutter
- shared_preferences_foundation (0.0.1):
- Flutter
Expand All @@ -17,16 +24,21 @@ PODS:
- Flutter

DEPENDENCIES:
- external_app_launcher (from `.symlinks/plugins/external_app_launcher/ios`)
- Flutter (from `Flutter`)
- flutter_icmp_ping (from `.symlinks/plugins/flutter_icmp_ping/ios`)
- flutter_isolate (from `.symlinks/plugins/flutter_isolate/ios`)
- network_info_plus (from `.symlinks/plugins/network_info_plus/ios`)
- nsd_ios (from `.symlinks/plugins/nsd_ios/ios`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
- permission_handler_apple (from `.symlinks/plugins/permission_handler_apple/ios`)
- shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
- url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`)

EXTERNAL SOURCES:
external_app_launcher:
:path: ".symlinks/plugins/external_app_launcher/ios"
Flutter:
:path: Flutter
flutter_icmp_ping:
Expand All @@ -35,8 +47,12 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/flutter_isolate/ios"
network_info_plus:
:path: ".symlinks/plugins/network_info_plus/ios"
nsd_ios:
:path: ".symlinks/plugins/nsd_ios/ios"
package_info_plus:
:path: ".symlinks/plugins/package_info_plus/ios"
path_provider_foundation:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
permission_handler_apple:
:path: ".symlinks/plugins/permission_handler_apple/ios"
shared_preferences_foundation:
Expand All @@ -45,15 +61,18 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/url_launcher_ios/ios"

SPEC CHECKSUMS:
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
external_app_launcher: ad55ac844aa21f2d2197d7cec58ff0d0dc40bbc0
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_icmp_ping: 2b159955eee0c487c766ad83fec224ae35e7c935
flutter_isolate: 0edf5081826d071adf21759d1eb10ff5c24503b5
network_info_plus: b78876159360f5580608c2cea620d6ceffabd0ad
package_info_plus: 6c92f08e1f853dc01228d6f553146438dafcd14e
permission_handler_apple: e76247795d700c14ea09e3a2d8855d41ee80a2e6
shared_preferences_foundation: 5b919d13b803cadd15ed2dc053125c68730e5126
url_launcher_ios: 08a3dfac5fb39e8759aeb0abbd5d9480f30fc8b4
network_info_plus: 6d0c3eb8367b8164fa3fb0c19875e3f59d49697f
nsd_ios: 8c37babdc6538e3350dbed3a52674d2edde98173
package_info_plus: 115f4ad11e0698c8c1c5d8a689390df880f47e85
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
permission_handler_apple: 9878588469a2b0d0fc1e048d9f43605f92e6cec2
shared_preferences_foundation: b4c3b4cddf1c21f02770737f147a3f5da9d39695
url_launcher_ios: 6116280ddcfe98ab8820085d8d76ae7449447586

PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3
PODFILE CHECKSUM: c4c93c5f6502fe2754f48404d3594bf779584011

COCOAPODS: 1.12.0
COCOAPODS: 1.15.2
20 changes: 19 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
1A9FEE1D7C757A2BE9D19399 /* [CP] Embed Pods Frameworks */,
9964CF9BE27615006489D488 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -161,7 +162,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
Expand Down Expand Up @@ -251,6 +252,23 @@
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
9964CF9BE27615006489D488 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Copy Pods Resources";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
A23E1C57A48CD5731ACA870B /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: A Network Analyzer

publish_to: 'none' # Remove this line if you wish to publish to pub.dev

version: 1.0.5+20
version: 1.0.5+21

environment:
sdk: ">=2.17.0 <3.0.0"
Expand Down
Loading