Skip to content

Commit f6243aa

Browse files
committed
feat: v1.0.5 - Implement extensive internationalization, add Chromecast support, introduce new UI screens and services, and set up CI/CD workflows.
1 parent 1e97518 commit f6243aa

100 files changed

Lines changed: 11434 additions & 511 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/FUNDING.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/SETUP_SECRETS.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# 🔐 GitHub Secrets Setup Guide
2+
3+
This guide explains how to set up the required GitHub secrets for Crowdin integration and automated releases.
4+
5+
## Required Secrets
6+
7+
### For Crowdin Integration (`crowdin-sync.yml`)
8+
9+
1. **CROWDIN_API_TOKEN**
10+
- **Description**: Your Crowdin Personal Access Token
11+
- **How to get it**:
12+
1. Go to https://crowdin.com/settings#api-key
13+
2. Click "New Token"
14+
3. Give it a name (e.g., "Musly GitHub Actions")
15+
4. Set scope to "Project" with read/write permissions
16+
5. Copy the generated token
17+
18+
2. **CROWDIN_PROJECT_ID**
19+
- **Description**: Your Crowdin Project ID
20+
- **How to get it**:
21+
1. Go to your project: https://crowdin.com/project/musly
22+
2. Click on "Settings" > "API"
23+
3. Copy the "Project ID" (numeric value)
24+
25+
### For Automated Releases (`release.yml`)
26+
27+
The `GITHUB_TOKEN` is automatically provided by GitHub Actions - no setup needed!
28+
29+
## How to Add Secrets to GitHub
30+
31+
1. Go to your repository: https://github.com/dddevid/Musly
32+
33+
2. Click on **Settings** tab
34+
35+
3. In the left sidebar, click on **Secrets and variables** > **Actions**
36+
37+
4. Click **New repository secret**
38+
39+
5. Add each secret:
40+
- **Name**: `CROWDIN_API_TOKEN`
41+
- **Value**: (paste your Crowdin API token)
42+
- Click **Add secret**
43+
44+
6. Repeat for `CROWDIN_PROJECT_ID`:
45+
- **Name**: `CROWDIN_PROJECT_ID`
46+
- **Value**: (paste your Crowdin project ID)
47+
- Click **Add secret**
48+
49+
## Verify Setup
50+
51+
Once secrets are added:
52+
53+
1. **Test Crowdin Sync**:
54+
- Go to **Actions** tab
55+
- Select "Crowdin Translations Sync" workflow
56+
- Click "Run workflow"
57+
- If successful, you'll see translations synced!
58+
59+
2. **Test Release Build** (optional):
60+
- Go to **Actions** tab
61+
- Select "Build and Release" workflow
62+
- Click "Run workflow"
63+
- Enter a version number (e.g., 1.0.5)
64+
- Builds will be created for Android, Windows, and Linux
65+
66+
## Workflow Triggers
67+
68+
### Crowdin Sync Workflow
69+
- **Automatic**: Runs daily at midnight UTC
70+
- **Manual**: Can be triggered manually from Actions tab
71+
- **On Push**: Runs when `lib/l10n/app_en.arb` is updated
72+
73+
### Release Workflow
74+
- **Automatic**: Triggers when you push a version tag (e.g., `v1.0.5`)
75+
- **Manual**: Can be triggered manually with custom version number
76+
77+
## Example: Creating a Release
78+
79+
```bash
80+
# Create and push a version tag
81+
git tag v1.0.5
82+
git push origin v1.0.5
83+
84+
# GitHub Actions will automatically:
85+
# 1. Build Android APK/AAB
86+
# 2. Build Windows executable
87+
# 3. Build Linux binary
88+
# 4. Create a GitHub Release with all artifacts
89+
```
90+
91+
## Troubleshooting
92+
93+
### Crowdin Sync Fails
94+
- Check that `CROWDIN_API_TOKEN` is valid and not expired
95+
- Verify `CROWDIN_PROJECT_ID` matches your project
96+
- Ensure the token has project read/write permissions
97+
98+
### Release Build Fails
99+
- Check the Actions log for specific error messages
100+
- Ensure Flutter version in workflow matches your development version
101+
- For Android: Verify Java version is correct (17)
102+
103+
### Secrets Not Found
104+
- Secrets are case-sensitive - use EXACT names
105+
- Secrets are only available to workflows in the same repository
106+
- Forked repositories don't inherit secrets (for security)
107+
108+
## Security Notes
109+
110+
⚠️ **Never commit secrets to the repository!**
111+
112+
- Secrets are encrypted and only accessible to GitHub Actions
113+
- They won't appear in logs or be accessible to pull requests from forks
114+
- Rotate tokens periodically for security
115+
- Use separate tokens for different purposes
116+
117+
## Need Help?
118+
119+
- **Crowdin issues**: Check [Crowdin documentation](https://support.crowdin.com/)
120+
- **GitHub Actions issues**: See [GitHub Actions documentation](https://docs.github.com/en/actions)
121+
- **App-specific questions**: Open an [issue](https://github.com/dddevid/Musly/issues)
122+
123+
---
124+
125+
Setup complete! 🎉 Your automation is ready to go.

.github/workflows/crowdin-sync.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Crowdin Translations Sync
2+
3+
on:
4+
# Run on push to master to upload new source strings
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- 'lib/l10n/app_en.arb'
10+
11+
# Run daily to download latest translations
12+
schedule:
13+
- cron: '0 0 * * *' # Daily at midnight UTC
14+
15+
# Allow manual trigger
16+
workflow_dispatch:
17+
18+
jobs:
19+
sync-crowdin:
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Crowdin push (upload source)
29+
uses: crowdin/github-action@v2
30+
with:
31+
upload_sources: true
32+
upload_translations: false
33+
download_translations: false
34+
env:
35+
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
36+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
37+
38+
- name: Crowdin pull (download translations)
39+
uses: crowdin/github-action@v2
40+
with:
41+
upload_sources: false
42+
upload_translations: false
43+
download_translations: true
44+
skip_untranslated_strings: true
45+
export_only_approved: false
46+
commit_message: 'chore: update translations from Crowdin'
47+
create_pull_request: true
48+
pull_request_title: 'New Crowdin translations'
49+
pull_request_body: 'New translations from Crowdin'
50+
pull_request_base_branch_name: 'master'
51+
env:
52+
CROWDIN_API_TOKEN: ${{ secrets.CROWDIN_API_TOKEN }}
53+
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
54+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
name: Build and Release
2+
3+
on:
4+
# Trigger on version tags
5+
push:
6+
tags:
7+
- 'v*.*.*'
8+
9+
# Allow manual trigger
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: 'Version number (e.g., 1.0.5)'
14+
required: true
15+
default: '1.0.5'
16+
17+
jobs:
18+
build-android:
19+
name: Build Android APK/AAB
20+
runs-on: ubuntu-latest
21+
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Java
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: 'zulu'
30+
java-version: '17'
31+
32+
- name: Setup Flutter
33+
uses: subosito/flutter-action@v2
34+
with:
35+
flutter-version: '3.27.x'
36+
channel: 'stable'
37+
38+
- name: Get dependencies
39+
run: flutter pub get
40+
41+
- name: Generate localizations
42+
run: flutter gen-l10n
43+
44+
- name: Build APK
45+
run: flutter build apk --release --split-per-abi
46+
47+
- name: Build App Bundle
48+
run: flutter build appbundle --release
49+
50+
- name: Upload APK artifacts
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: android-apk
54+
path: |
55+
build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk
56+
build/app/outputs/flutter-apk/app-arm64-v8a-release.apk
57+
build/app/outputs/flutter-apk/app-x86_64-release.apk
58+
59+
- name: Upload AAB artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: android-aab
63+
path: build/app/outputs/bundle/release/app-release.aab
64+
65+
build-windows:
66+
name: Build Windows
67+
runs-on: windows-latest
68+
69+
steps:
70+
- name: Checkout code
71+
uses: actions/checkout@v4
72+
73+
- name: Setup Flutter
74+
uses: subosito/flutter-action@v2
75+
with:
76+
flutter-version: '3.27.x'
77+
channel: 'stable'
78+
79+
- name: Get dependencies
80+
run: flutter pub get
81+
82+
- name: Generate localizations
83+
run: flutter gen-l10n
84+
85+
- name: Build Windows
86+
run: flutter build windows --release
87+
88+
- name: Package Windows Build
89+
run: |
90+
cd build/windows/x64/runner/Release
91+
Compress-Archive -Path * -DestinationPath ../../../../../musly-windows-x64.zip
92+
93+
- name: Upload Windows artifact
94+
uses: actions/upload-artifact@v4
95+
with:
96+
name: windows-build
97+
path: musly-windows-x64.zip
98+
99+
build-linux:
100+
name: Build Linux
101+
runs-on: ubuntu-latest
102+
103+
steps:
104+
- name: Checkout code
105+
uses: actions/checkout@v4
106+
107+
- name: Install dependencies
108+
run: |
109+
sudo apt-get update
110+
sudo apt-get install -y \
111+
clang cmake ninja-build pkg-config \
112+
libgtk-3-dev liblzma-dev \
113+
libmpv-dev mpv
114+
115+
- name: Setup Flutter
116+
uses: subosito/flutter-action@v2
117+
with:
118+
flutter-version: '3.27.x'
119+
channel: 'stable'
120+
121+
- name: Get dependencies
122+
run: flutter pub get
123+
124+
- name: Generate localizations
125+
run: flutter gen-l10n
126+
127+
- name: Build Linux
128+
run: flutter build linux --release
129+
130+
- name: Package Linux Build
131+
run: |
132+
cd build/linux/x64/release/bundle
133+
tar -czf ../../../../../musly-linux-x64.tar.gz *
134+
135+
- name: Upload Linux artifact
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: linux-build
139+
path: musly-linux-x64.tar.gz
140+
141+
create-release:
142+
name: Create GitHub Release
143+
needs: [build-android, build-windows, build-linux]
144+
runs-on: ubuntu-latest
145+
permissions:
146+
contents: write
147+
148+
steps:
149+
- name: Checkout code
150+
uses: actions/checkout@v4
151+
152+
- name: Download all artifacts
153+
uses: actions/download-artifact@v4
154+
with:
155+
path: artifacts
156+
157+
- name: Get version
158+
id: version
159+
run: |
160+
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
161+
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
162+
else
163+
echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
164+
fi
165+
166+
- name: Create Release
167+
uses: softprops/action-gh-release@v1
168+
with:
169+
tag_name: v${{ steps.version.outputs.VERSION }}
170+
name: Release v${{ steps.version.outputs.VERSION }}
171+
body: |
172+
## 🎉 Musly v${{ steps.version.outputs.VERSION }}
173+
174+
### 📦 Downloads
175+
176+
**Android:**
177+
- ARM64: `app-arm64-v8a-release.apk` (recommended for most devices)
178+
- ARMv7: `app-armeabi-v7a-release.apk` (for older devices)
179+
- x86_64: `app-x86_64-release.apk` (for emulators)
180+
- App Bundle: `app-release.aab` (for Play Store)
181+
182+
**Windows:**
183+
- `musly-windows-x64.zip` (extract and run Musly.exe)
184+
185+
**Linux:**
186+
- `musly-linux-x64.tar.gz` (extract and run musly)
187+
188+
### 📝 Changelog
189+
See [CHANGELOG.md](https://github.com/dddevid/Musly/blob/main/CHANGELOG.md)
190+
191+
### 🌍 Translations
192+
Contribute translations at [Crowdin](https://crowdin.com/project/musly)
193+
draft: false
194+
prerelease: false
195+
files: |
196+
artifacts/android-apk/*.apk
197+
artifacts/android-aab/*.aab
198+
artifacts/windows-build/*.zip
199+
artifacts/linux-build/*.tar.gz
200+
env:
201+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)