forked from lohanidamodar/flutter_ui_challenges
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
29294dd
commit ccb1e99
Showing
4 changed files
with
204 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
name: Linux-CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- isomorphic | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Branch name | ||
id: branch_name | ||
run: | | ||
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | ||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: "8.x" | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "dev" | ||
|
||
- name: Change flutter channel to master, enable linux support | ||
run: | | ||
flutter channel master | ||
flutter upgrade | ||
flutter config --enable-linux-desktop | ||
flutter pub get | ||
- name: Build linux | ||
run: | | ||
flutter build linux | ||
- name: Debug | ||
run: | | ||
sudo npm install tree-node-cli -g | ||
treee build | ||
- name: Prepare release files | ||
run: | | ||
cp -r build/linux/release flutter_ui_challenges-linux-${{ steps.branch_name.outputs.SOURCE_NAME }} | ||
zip flutter_ui_challenges-linux-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip -r flutter_ui_challenges-linux-${{ steps.branch_name.outputs.SOURCE_NAME }} | ||
- uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
file: flutter_ui_challenges-linux-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip | ||
tags: true | ||
draft: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: MacOS-CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- isomorphic | ||
tags: | ||
- "*" | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Branch name | ||
id: branch_name | ||
run: | | ||
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | ||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: "8.x" | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "dev" | ||
|
||
- name: Change flutter channel to master, enable macos support | ||
run: | | ||
flutter channel master | ||
flutter upgrade | ||
flutter config --enable-macos-desktop | ||
flutter pub get | ||
- name: Build macos, apk, ios(simulator) | ||
run: | | ||
flutter build macos | ||
flutter build apk | ||
flutter build ios --debug --no-codesign --simulator | ||
- name: Debug | ||
run: | | ||
sudo npm install tree-node-cli -g | ||
treee build | ||
- name: Prepare release files | ||
run: | | ||
cp -r build/macos/Build/Products/Release/flutter_ui_challenges.app flutter_ui_challenges-macos-${{ steps.branch_name.outputs.SOURCE_NAME }}.app | ||
cp -r build/ios/Debug-iphonesimulator/Runner.app flutter_ui_challenges-ios-${{ steps.branch_name.outputs.SOURCE_NAME }}.app | ||
zip flutter_ui_challenges-macos-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip -r flutter_ui_challenges-macos-${{ steps.branch_name.outputs.SOURCE_NAME }}.app | ||
zip flutter_ui_challenges-ios-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip -r flutter_ui_challenges-ios-${{ steps.branch_name.outputs.SOURCE_NAME }}.app | ||
cp build/app/outputs/apk/release/app-release.apk flutter_ui_challenges-android-${{ steps.branch_name.outputs.SOURCE_NAME }}.apk | ||
- uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
file: flutter_ui_challenges-macos-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip;flutter_ui_challenges-ios-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip;flutter_ui_challenges-android-${{ steps.branch_name.outputs.SOURCE_NAME }}.apk | ||
tags: true | ||
draft: false |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: WEB-CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- isomorphic | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: "8.x" | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "beta" | ||
|
||
- name: Enable web support | ||
run: | | ||
flutter upgrade | ||
flutter config --enable-web | ||
flutter pub get | ||
- name: Build web | ||
run: | | ||
flutter build web | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./build/web/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Windows-CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- isomorphic | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Branch name | ||
id: branch_name | ||
run: | | ||
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/} | ||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
shell: bash | ||
|
||
- uses: actions/setup-java@v1 | ||
with: | ||
java-version: "8.x" | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "dev" | ||
|
||
- name: Change flutter channel to master, enable windows support | ||
run: | | ||
flutter channel master | ||
flutter upgrade | ||
flutter config --enable-windows-desktop | ||
flutter pub get | ||
- name: Build windows | ||
run: | | ||
flutter build windows | ||
- name: Prepare release files | ||
run: | | ||
7z a -tzip flutter_ui_challenges-windows-x64-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip -r .\build\windows\x64\Release\Runner\* | ||
- uses: xresloader/upload-to-github-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
file: flutter_ui_challenges-windows-x64-${{ steps.branch_name.outputs.SOURCE_NAME }}.zip | ||
tags: true | ||
draft: false |