Skip to content

Commit

Permalink
Merge pull request #13 from Thuenen-Forest-Ecosystems/deployment_windows
Browse files Browse the repository at this point in the history
release only on main
  • Loading branch information
b-lack authored Sep 18, 2024
2 parents 9a39cde + 9c92790 commit fb1ad03
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 13 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/deploy-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Flutter Desktop CI
on:
push:
tags:
- '*'
- 'v*'

jobs:
build-and-release-linux:
Expand All @@ -15,6 +15,11 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Exit if not on main branch
if: endsWith(github.ref, 'main') == false
run: exit -1

- uses: subosito/flutter-action@v1
with:
channel: 'stable'
Expand Down Expand Up @@ -44,21 +49,19 @@ jobs:
- name: Build artifacts
run: flutter build linux --release

# https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-part-3-linux-24ef8d30a5b4

- name: Archive Release
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: MacRecoveryX-${{github.ref_name}}-linux.zip
filename: TFM-${{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/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/linux/x64/release/bundle/MacRecoveryX-${{github.ref_name}}-linux.zip
files: build/linux/x64/release/bundle/TFM-${{github.ref_name}}-linux.zip

build-and-release-windows:
runs-on: windows-latest
Expand All @@ -68,6 +71,11 @@ jobs:

steps:
- uses: actions/checkout@v2

- name: Exit if not on main branch
if: endsWith(github.ref, 'main') == false
run: exit -1

- uses: subosito/flutter-action@v1
with:
channel: 'stable'
Expand All @@ -92,7 +100,7 @@ jobs:
uses: thedoctor0/zip-release@master
with:
type: 'zip'
filename: MacRecoveryX-${{github.ref_name}}-windows.zip
filename: TFM-${{github.ref_name}}-windows.zip
directory: build/windows/x64/runner/release

- name: Windows Release
Expand All @@ -101,7 +109,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: build/windows/x64/runner/release/MacRecoveryX-${{github.ref_name}}-windows.zip
files: build/windows/x64/runner/release/TFM-${{github.ref_name}}-windows.zip

#build-and-release-macos:
# runs-on: macos-latest
Expand All @@ -126,12 +134,12 @@ jobs:
# uses: thedoctor0/zip-release@master
# with:
# type: 'zip'
# filename: MacRecoveryX-${{github.ref_name}}-macos.zip
# filename: TFM-${{github.ref_name}}-macos.zip
# directory: build/macos/Build/Products/Release
# - name: macOS Release
# uses: softprops/action-gh-release@v1
# if: startsWith(github.ref, 'refs/tags/v')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# files: build/macos/Build/Products/Release/MacRecoveryX-${{github.ref_name}}-macos.zip
# files: build/macos/Build/Products/Release/TFM-${{github.ref_name}}-macos.zip
8 changes: 5 additions & 3 deletions .github/workflows/deploy_mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ name: Flutter Mobile CI
#https://medium.com/@colonal/automating-flutter-builds-and-releases-with-github-actions-77ccf4a1ccdd
#https://medium.com/lodgify-technology-blog/deploy-your-flutter-app-to-google-play-with-github-actions-f13a11c4492e

#https://medium.com/@fluttergems/packaging-and-distributing-flutter-desktop-apps-the-missing-guide-part-3-linux-24ef8d30a5b4

on:
push:
tags:
- '*'
- 'v*'

jobs:
build:
name: Build & Release
name: Build & Release Mobile
runs-on: macos-latest

steps:
Expand Down Expand Up @@ -66,7 +68,7 @@ jobs:
#9 Upload Artifacts
- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Releases
path: |
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+4
version: 1.0.0+5

environment:
sdk: '>=3.4.4 <4.0.0'
Expand Down

0 comments on commit fb1ad03

Please sign in to comment.