feat: Implement circular progress indicator and enhance UI/UX #29
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/build.yml | |
| # This workflow builds, packages, and creates a draft release for the application on Windows (x64), | |
| # macOS (x64, arm64), and Linux (x64, arm64), including AppImage for Linux. | |
| name: Build and Release | |
| on: | |
| push: | |
| branches: [ "release" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-22.04 | |
| arch: "x64" | |
| runner: "ubuntu-22.04" | |
| gradle_task: "packageReleaseDeb" | |
| os_name: "linux" | |
| - os: ubuntu-22.04-arm | |
| arch: "arm64" | |
| runner: "ubuntu-22.04-arm" | |
| gradle_task: "packageReleaseDeb" | |
| os_name: "linux" | |
| - os: ubuntu-22.04 | |
| arch: "x64" | |
| runner: "ubuntu-22.04" | |
| gradle_task: "createReleaseDistributable" | |
| os_name: "linux-AppImage" | |
| - os: ubuntu-22.04-arm | |
| arch: "arm64" | |
| runner: "ubuntu-22.04-arm" | |
| gradle_task: "createReleaseDistributable" | |
| os_name: "linux-AppImage" | |
| - os: macos-13 | |
| arch: "x64" | |
| runner: "macos-13" | |
| gradle_task: "packageReleaseDmg packageReleasePkg" | |
| os_name: "macos" | |
| - os: macos-latest | |
| arch: "arm64" | |
| runner: "macos-15" | |
| gradle_task: "packageReleaseDmg packageReleasePkg" | |
| os_name: "macos" | |
| - os: windows-latest | |
| arch: "x64" | |
| runner: "windows-latest" | |
| gradle_task: "packageReleaseMsi packageReleaseExe" | |
| os_name: "windows" | |
| - os: windows-11-arm | |
| arch: "arm64" | |
| runner: "windows-11-arm" | |
| gradle_task: "packageReleaseMsi packageReleaseExe" | |
| os_name: "windows" | |
| runs-on: ${{ matrix.runner }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Update and Install Dependencies for Ubuntu | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| - name: Install Dependencies for linux-AppImage | |
| if: matrix.os_name == 'linux-AppImage' | |
| run: | | |
| sudo apt-get install -y libfuse2 | |
| - name: Set up JDK 21 for Windows ARM | |
| if: matrix.os == 'windows-11-arm' | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '21' | |
| architecture: ${{ matrix.arch }} | |
| - name: Set up JDK 24 for other architectures | |
| if: matrix.os != 'windows-11-arm' | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'zulu' | |
| java-version: '24' | |
| architecture: ${{ matrix.arch }} | |
| - name: Grant execute permission for gradlew | |
| if: runner.os != 'Windows' | |
| run: chmod +x ./gradlew | |
| - name: Build Jar with Gradle on Windows | |
| if: matrix.os_name == 'windows' | |
| shell: bash | |
| run: ./gradlew.bat -PosArch=${{ matrix.arch }} ${{ matrix.gradle_task }} packageReleaseUberJarForCurrentOS | |
| - name: Build Jar with Gradle on macOS | |
| if: matrix.os_name == 'macos' | |
| run: ./gradlew -PosArch=${{ matrix.arch }} ${{ matrix.gradle_task }} packageReleaseUberJarForCurrentOS | |
| - name: Build Jar with Gradle on Ubuntu-24 | |
| if: matrix.os_name == 'linux' | |
| run: ./gradlew -PosArch=${{ matrix.arch }} ${{ matrix.gradle_task }} packageReleaseUberJarForCurrentOS | |
| - name: Build DistributablePackage with Gradle on Ubuntu-22 | |
| if: matrix.os_name == 'linux-AppImage' | |
| run: ./gradlew -PosArch=${{ matrix.arch }} ${{ matrix.gradle_task }} | |
| - name: Build AppImage on Ubuntu-22 | |
| if: matrix.os_name == 'linux-AppImage' | |
| shell: bash | |
| run: | | |
| # 1. Define paths and variables | |
| ARTIFACT_DIR="composeApp/build/compose/binaries/main-release" | |
| APP_NAME="pomolin" | |
| GRADLE_APP_DIR="$ARTIFACT_DIR/app/$APP_NAME" | |
| APPDIR_NAME="$APP_NAME.AppDir" | |
| # 2. Dynamically select and download the correct appimagetool | |
| if [ "${{ matrix.arch }}" = "arm64" ]; then | |
| TOOL_ARCH="aarch64" | |
| else | |
| TOOL_ARCH="x86_64" | |
| fi | |
| TOOL_FILENAME="appimagetool-${TOOL_ARCH}.AppImage" | |
| TOOL_URL="https://github.com/AppImage/AppImageKit/releases/download/continuous/${TOOL_FILENAME}" | |
| echo "Downloading $TOOL_FILENAME..." | |
| wget -q "$TOOL_URL" | |
| chmod +x "$TOOL_FILENAME" | |
| # 3. Create the AppDir structure | |
| echo "Creating $APPDIR_NAME..." | |
| mkdir -p "$APPDIR_NAME/usr/lib" | |
| echo "Moving $GRADLE_APP_DIR to $APPDIR_NAME/usr/lib/" | |
| mv "$GRADLE_APP_DIR" "$APPDIR_NAME/usr/lib/" | |
| # 4. Create the .desktop file | |
| echo "Creating .desktop file..." | |
| cat <<EOF > "$APPDIR_NAME/$APP_NAME.desktop" | |
| [Desktop Entry] | |
| Name=pomolin | |
| Comment=A simple Pomodoro App written in Kotlin. Focus on what matters! | |
| Exec=pomolin | |
| Icon=pomolin | |
| Terminal=false | |
| Type=Application | |
| Categories=Utility | |
| EOF | |
| # 5. Copy the icon | |
| echo "Copying icon..." | |
| ICON_STD_PATH="$APPDIR_NAME/usr/share/icons/hicolor/512x512/apps" | |
| mkdir -p "$ICON_STD_PATH" | |
| cp "$APPDIR_NAME/usr/lib/$APP_NAME/lib/$APP_NAME.png" "$ICON_STD_PATH/$APP_NAME.png" | |
| cp "$APPDIR_NAME/usr/lib/$APP_NAME/lib/$APP_NAME.png" "$APPDIR_NAME/$APP_NAME.png" | |
| # 6. Create the AppRun script | |
| echo "Creating AppRun script..." | |
| cat <<EOF > "$APPDIR_NAME/AppRun" | |
| #!/bin/sh | |
| exec "\$APPDIR/usr/lib/$APP_NAME/bin/$APP_NAME" "\$@" | |
| EOF | |
| chmod +x "$APPDIR_NAME/AppRun" | |
| # 7. Run the correct appimagetool | |
| echo "Building AppImage with $TOOL_FILENAME..." | |
| ./"$TOOL_FILENAME" "$APPDIR_NAME" | |
| # 8. Move the final AppImage to the artifacts directory for upload | |
| mkdir -p "$ARTIFACT_DIR/appimage" | |
| # Use a wildcard to move the generated AppImage regardless of its arch name | |
| mv pomolin-*.AppImage "$ARTIFACT_DIR/appimage/" | |
| echo "AppImage created successfully!" | |
| - name: Rename Packages for Release | |
| shell: bash | |
| run: | | |
| ARTIFACT_DIR="composeApp/build/compose/binaries/main-release" | |
| ARCH="${{ matrix.arch }}" | |
| rename_files() { | |
| DIR_PATH="$1" | |
| EXT="$2" | |
| if [ -d "$DIR_PATH" ]; then | |
| for f in "$DIR_PATH"/*."$EXT"; do | |
| if [ -f "$f" ]; then | |
| # Constructs the new name, e.g., app-1.0.0.msi -> app-1.0.0-x64.msi | |
| NEW_NAME="$(basename "$f" ."$EXT")-$ARCH.$EXT" | |
| echo "Renaming $f to $DIR_PATH/$NEW_NAME" | |
| mv "$f" "$DIR_PATH/$NEW_NAME" | |
| fi | |
| done | |
| fi | |
| } | |
| # Rename only the package types that have conflicting names | |
| rename_files "$ARTIFACT_DIR/dmg" "dmg" | |
| rename_files "$ARTIFACT_DIR/pkg" "pkg" | |
| rename_files "$ARTIFACT_DIR/msi" "msi" | |
| rename_files "$ARTIFACT_DIR/exe" "exe" | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: package-${{ matrix.os_name }}-${{ matrix.arch }} | |
| path: | | |
| composeApp/build/compose/binaries/main-release/deb/*.deb | |
| # <--- ADDED: Include the AppImage in the upload | |
| composeApp/build/compose/binaries/main-release/appimage/*.AppImage | |
| composeApp/build/compose/binaries/main-release/dmg/*.dmg | |
| composeApp/build/compose/binaries/main-release/pkg/*.pkg | |
| composeApp/build/compose/binaries/main-release/msi/*.msi | |
| composeApp/build/compose/binaries/main-release/exe/*.exe | |
| composeApp/build/compose/jars/*.jar | |
| retention-days: 1 | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Get Project Version | |
| id: get_version | |
| run: | | |
| # Extracts the version from the line 'packageVersion = "1.0.0"' | |
| VERSION=$(grep 'packageVersion = ' composeApp/build.gradle.kts | head -n 1 | sed -e 's/.*packageVersion = "\(.*\)"/\1/') | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| - name: Download all build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Create Draft Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Pomolin v${{ steps.get_version.outputs.version }} Beta | |
| draft: true | |
| tag_name: v${{ steps.get_version.outputs.version }} | |
| body: | | |
| ### Description: | |
| Pomolin is a simple, beautiful, and minimalist Pomodoro timer for your desktop. Designed to help you stay focused and productive, it provides an elegant and straightforward way to manage your work and break intervals. With a clean interface and essential features, Pomolin helps you get into a rhythm of focused work sessions followed by refreshing breaks, all from a native desktop application. | |
| > Note: AppImages are the preferred way to run the app for linux, if you encounter any issues with AppImage, feel free to report them using github issues. | |
| ### 📦 Assets & Downloads: | |
| Download the appropriate package for your operating system and architecture below. All builds are created automatically via GitHub Actions. You can download an operating system specific package or an operating system specific jar. | |
| > Note: If using a jar to run the application, make sure that you are using Java 24. ( For windows 11 arm use Java21) | |
| files: artifacts/**/* |