name: Build Windows App on: push: branches: [ master ] tags: - 'v*' workflow_dispatch: jobs: build-windows: runs-on: windows-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Setup Flutter uses: subosito/flutter-action@v2 with: channel: 'stable' - name: Get dependencies run: flutter pub get - name: Build Windows app run: flutter build windows --release - name: Get version from pubspec id: version run: | $yaml = Get-Content pubspec.yaml $version = ($yaml | Select-String "version:\s*(.+)").Matches.Groups[1].Value echo "VERSION=$version" >> $env:GITHUB_OUTPUT echo "Version: $version" - name: Create zip archive run: | Compress-Archive -Path build/windows/x64/runner/Release/* -DestinationPath peridot-${{ steps.version.outputs.VERSION }}-windows-portable.zip - name: Upload Windows artifact uses: actions/upload-artifact@v4 with: name: windows-build path: peridot-${{ steps.version.outputs.VERSION }}-windows-portable.zip - name: Create Release if: startsWith(github.ref, 'refs/tags/') uses: softprops/action-gh-release@v1 with: files: peridot-${{ steps.version.outputs.VERSION }}-windows-portable.zip draft: false prerelease: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}