Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
matteriot committed Oct 17, 2023
1 parent 0a64475 commit a4f20e9
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 8 deletions.
73 changes: 66 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
tags:
- '*'

permissions:
contents: write

jobs:
android:
name: Android
Expand All @@ -15,10 +18,6 @@ jobs:
run: chmod +x ./.github/scripts/decrypt_secret.sh&&./.github/scripts/decrypt_secret.sh
env:
LARGE_SECRET_PASSPHRASE: ${{ secrets.GPG_LARGE_SECRET_PASSPHRASE }}
# - uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: '17'
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
Expand Down Expand Up @@ -55,14 +54,20 @@ jobs:
- run: flutter config --no-enable-android
- run: flutter pub get
- run: flutter build ipa --release --no-codesign
- uses: actions/upload-artifact@v3
- name: Release iOS IPA
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: Runner.xcarchive
path: ./build/ios/archive/Runner.xcarchive
files: |
./build/ios/archive/Runner.xcarchive
LICENSE
body_path: ./.github/doc/DownloadDescription.md

linux:
name: Linux
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
Expand All @@ -76,6 +81,28 @@ jobs:
flutter config --no-enable-android
flutter pub get
flutter build linux --release
# - name: Release Linux Zip
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: |
# ./build/linux/x64/release/bundle
# LICENSE
# body_path: ./.github/doc/DownloadDescription.md
- run: rm -rf ./build
- name: Install snapcraft
run: |
sudo snap install snapcraft --classic
- run: hash -r
- name: Setup LXD
uses: canonical/setup-lxd@v0.1.1
with:
channel: latest/stable
- name: run snapcraft
run: |
snapcraft --use-lxd
- run: snapcraft upload --release=stable *.snap

#
macos:
name: MacOS
Expand All @@ -89,6 +116,20 @@ jobs:
- run: flutter config --no-enable-android
- run: flutter pub get
- run: flutter build macos --release
- run: mkdir -p build/dmg
- run: cp -R build/macos/Build/Products/Release/openiothub.app build/dmg/openiothub.app
- run: ln -s /Applications build/dmg
- run: ls build/dmg
# https://github.com/create-dmg/create-dmg.git
- run: hdiutil create -srcfolder build/dmg -volname "OpenIoTHub" -format UDZO -ov -imagekey zlib-level=9 openiothub.dmg
- name: Release MacOS dmg
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./openiothub.dmg
LICENSE
body_path: ./.github/doc/DownloadDescription.md
#
windows:
name: Windows
Expand All @@ -102,3 +143,21 @@ jobs:
- run: flutter config --no-enable-android
- run: flutter pub get
- run: flutter build windows --release
# - name: Release windows zip
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: |
# ./build/windows/runner/Release
# LICENSE
# body_path: ./.github/doc/DownloadDescription.md
- run: dart run msix:create
- name: Release windows msix
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
./build/windows/runner/Release/openiothub.msix
LICENSE
body_path: ./.github/doc/DownloadDescription.md

1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ jobs:
- run: cp -R build/macos/Build/Products/Release/openiothub.app build/dmg/openiothub.app
- run: ln -s /Applications build/dmg
- run: ls build/dmg
# https://github.com/create-dmg/create-dmg.git
- run: hdiutil create -srcfolder build/dmg -volname "OpenIoTHub" -format UDZO -ov -imagekey zlib-level=9 openiothub.dmg
- uses: actions/upload-artifact@v3
with:
Expand Down
4 changes: 3 additions & 1 deletion ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@
66152A105103AF5F8DAB4B37 /* Pods-RunnerTests.release.xcconfig */,
0B7DE0FC8D7F20134C951DD2 /* Pods-RunnerTests.profile.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -469,6 +468,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2R74CQ6MD7;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down Expand Up @@ -647,6 +647,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2R74CQ6MD7;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -669,6 +670,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
DEVELOPMENT_TEAM = 2R74CQ6MD7;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down

0 comments on commit a4f20e9

Please sign in to comment.