Skip to content

commit 233061c

abduznik edited this page May 23, 2026 · 1 revision

ci: add automated release workflow for Windows and macOS

Commit: 233061c25765637483a33d17c259ad617bc5dfc0

Author: Yan

Date: 2026-03-31

Why: Improves the continuous integration / release pipeline.

Files Changed

.github/workflows/release.yml | 91 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)
  • .github/workflows/release.yml

Diff

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..89839ac
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,91 @@
+name: Release
+
+on:
+  push:
+    tags:
+      - 'v*'
+
+jobs:
+  build-windows:
+    name: Build Windows
+    runs-on: windows-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Set up Flutter
+        uses: subosito/flutter-action@v2
+        with:
+          channel: stable
+          cache: true
+
+      - name: Install dependencies
+        run: flutter pub get
+
+      - name: Build Windows
+        run: flutter build windows --release
+
+      - name: Archive Windows build
+        shell: pwsh
+        run: Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath freegosy-windows.zip
+
+      - name: Upload Windows artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: windows-release
+          path: freegosy-windows.zip
+
+  build-macos:
+    name: Build macOS
+    runs-on: macos-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v4
+
+      - name: Set up Flutter
+        uses: subosito/flutter-action@v2
+        with:
+          channel: stable
+          cache: true
+
+      - name: Install dependencies
+        run: flutter pub get
+
+      - name: Build macOS
+        run: flutter build macos --release --no-codesign
+
+      - name: Archive macOS build
+        run: |
+          cd build/macos/Build/Products/Release
+          zip -r ../../../../../freegosy-macos.zip freegosy.app
+
+      - name: Upload macOS artifact
+        uses: actions/upload-artifact@v4
+        with:
+          name: macos-release
+          path: freegosy-macos.zip
+
+  release:
+    name: Create GitHub Release
+    needs: [build-windows, build-macos]
+    runs-on: ubuntu-latest
+    permissions:
+      contents: write
+    steps:
+      - name: Download all artifacts
+        uses: actions/download-artifact@v4
+        with:
+          merge-multiple: true
+
+      - name: Create Release
+        uses: softprops/action-gh-release@v2
+        with:
+          files: |
+            freegosy-windows.zip
+            freegosy-macos.zip
+          body: |
+            See CHANGELOG for details.
+            
+            macOS users: right-click the app → Open on first launch (Gatekeeper warning is expected — app is not notarized).
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Clone this wiki locally