v1.1.6: Fix Android screen-off time freezing and intelligent sound re… #15
Workflow file for this run
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
| name: Build and Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Publish App | |
| # Remove PDBs, enable compression, and ensure single file output | |
| run: dotnet publish clock.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:CopyOutputSymbolsToPublishDirectory=false -p:DebugType=None -p:DebugSymbols=false -p:EnableCompressionInSingleFile=true -o publish | |
| - name: Rename EXE for release | |
| shell: pwsh | |
| run: mv publish/clock.exe ./clock-win-x64.exe | |
| - name: Upload Windows Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-release | |
| path: clock-win-x64.exe | |
| build-android: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x clock-android/gradlew | |
| - name: Build with Gradle | |
| run: cd clock-android && ./gradlew assembleDebug | |
| - name: Upload APK | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: android-release | |
| path: clock-android/app/build/outputs/apk/debug/*.apk | |
| create-release: | |
| needs: [build-windows, build-android] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download Windows Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: windows-release | |
| - name: Download Android Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: android-release | |
| - name: Find and Rename APK | |
| run: | | |
| APK_FILE=$(find . -name "*.apk" | head -n 1) | |
| if [ -z "$APK_FILE" ]; then | |
| echo "No APK found!" | |
| exit 1 | |
| fi | |
| mv "$APK_FILE" clock.apk | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| clock-win-x64.exe | |
| clock.apk | |
| name: Release ${{ github.ref_name }} | |
| body: | | |
| ## Clock v${{ github.ref_name }} | |
| Automatic build by GitHub Actions for multiple platforms. | |
| ### Windows Installation | |
| 1. Download `clock-win-x64.exe`. | |
| 2. **Important**: Place it in a folder. If you want sounds, add your notification sound as `Assets/notify.wav` in the same folder. | |
| 3. Run the `.exe`. | |
| ### Android Installation | |
| 1. Download `clock.apk`. | |
| 2. Install on your Android device. | |
| 3. Uses system default notification sounds. | |
| --- | |
| *Built with Google Gemini & GitHub Actions* | |
| draft: false | |
| prerelease: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |