Skip to content

feat: Introduce a new documentation site, update to version 0.0.2, an… #9

feat: Introduce a new documentation site, update to version 0.0.2, an…

feat: Introduce a new documentation site, update to version 0.0.2, an… #9

Workflow file for this run

name: Release Build
on:
push:
tags:
- 'v*'
workflow_dispatch:
permissions:
contents: write
jobs:
build:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
# Linux x64
- os: linux
arch: x64
runner: ubuntu-latest
# macOS x64
- os: macos
arch: x64
runner: macos-15-intel
# macOS arm64 (Apple Silicon)
- os: macos
arch: arm64
runner: macos-14
# Windows x64
- os: windows
arch: x64
runner: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Linux Dependencies
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Show environment info
shell: bash
run: |
echo "Runner OS: ${{ runner.os }}"
echo "Runner Architecture: ${{ runner.arch }}"
echo "Matrix OS: ${{ matrix.os }}"
echo "Matrix Arch: ${{ matrix.arch }}"
flutter --version
- name: Install dependencies
run: flutter pub get
- name: Run tests
run: flutter test
- name: Enable desktop support
run: flutter config --enable-linux-desktop --enable-macos-desktop --enable-windows-desktop
- name: Get version from tag
id: get_version
shell: bash
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Linux x64 app
if: matrix.os == 'linux' && matrix.arch == 'x64'
run: |
flutter build linux --release
cd build/linux/x64/release/bundle
zip -r $GITHUB_WORKSPACE/build/taskly-${{ env.VERSION }}-linux-x64.zip .
- name: Build macOS x64 app
if: matrix.os == 'macos' && matrix.arch == 'x64'
run: |
flutter build macos --release
cd build/macos/Build/Products/Release
zip -r $GITHUB_WORKSPACE/build/taskly-${{ env.VERSION }}-macos-x64.zip Taskly.app
- name: Build macOS arm64 app
if: matrix.os == 'macos' && matrix.arch == 'arm64'
run: |
flutter build macos --release
cd build/macos/Build/Products/Release
zip -r $GITHUB_WORKSPACE/build/taskly-${{ env.VERSION }}-macos-arm64.zip Taskly.app
- name: Build Windows x64 app
if: matrix.os == 'windows' && matrix.arch == 'x64'
shell: powershell
run: |
flutter build windows --release
$version = $env:VERSION
$source = "build\windows\x64\runner\Release"
$destination = "build\taskly-$version-windows-x64.zip"
Compress-Archive -Path $source -DestinationPath $destination -Force
- name: List build artifacts
shell: bash
run: |
ls -la build/ || echo "Build directory not found"
ls -la build/*.zip 2>/dev/null || echo "No zip files found in build/"
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: |
build/taskly-*.zip
name: Release v${{ env.VERSION }}
generate_release_notes: true
body: |
## Downloads
### Windows
- [taskly-${{ env.VERSION }}-windows-x64.zip](https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/taskly-${{ env.VERSION }}-windows-x64.zip)
### macOS
- [taskly-${{ env.VERSION }}-macos-x64.zip](https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/taskly-${{ env.VERSION }}-macos-x64.zip) (Intel)
- [taskly-${{ env.VERSION }}-macos-arm64.zip](https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/taskly-${{ env.VERSION }}-macos-arm64.zip) (Apple Silicon)
### Linux
- [taskly-${{ env.VERSION }}-linux-x64.zip](https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/taskly-${{ env.VERSION }}-linux-x64.zip)
---
*Release notes are automatically generated.*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}