Skip to content

Commit e578332

Browse files
committed
Update Flutter channel to stable and add release job for artifact management
1 parent ca0f6e7 commit e578332

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

.github/workflows/build.yml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
4848
- uses: subosito/flutter-action@v2
4949
with:
50-
channel: 'master'
50+
channel: 'stable'
5151
cache: true
5252
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:' # optional, change this to force refresh cache
5353
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:' # optional, change this to specify the cache path
@@ -160,4 +160,33 @@ jobs:
160160
with:
161161
name: ${{ matrix.target }}
162162
path: ./build/macos/Build/Products/Release/result.zip
163-
if-no-files-found: error
163+
if-no-files-found: error
164+
165+
release:
166+
name: Create Release
167+
needs: build
168+
if: startsWith(github.ref, 'refs/tags/')
169+
runs-on: ubuntu-latest
170+
steps:
171+
- name: Download all artifacts
172+
uses: actions/download-artifact@v3
173+
with:
174+
path: artifacts
175+
176+
- name: List downloaded artifacts
177+
run: ls -R artifacts
178+
179+
- name: Zip Linux artifacts
180+
run: |
181+
cd artifacts/linux-x64
182+
zip -r ../linux-x64.zip .
183+
184+
- name: Create Release
185+
uses: softprops/action-gh-release@v1
186+
with:
187+
files: |
188+
artifacts/windows-x64/desktop_adb_file_browser.msix
189+
artifacts/windows-x64/windows_installer.exe
190+
artifacts/linux-x64.zip
191+
artifacts/macos-x64/result.zip
192+
fail_on_unmatched_files: false

0 commit comments

Comments
 (0)