From a54cb5c7691333145bb9df398ce9c41f8b8a5872 Mon Sep 17 00:00:00 2001 From: knighthat Date: Tue, 8 Oct 2024 13:15:40 -0500 Subject: [PATCH 1/2] automatically build & deploy custom version every week --- .../workflows/weekly-deploy-customversion.yml | 92 +++++++++++++++++++ README.md | 2 +- 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/weekly-deploy-customversion.yml diff --git a/.github/workflows/weekly-deploy-customversion.yml b/.github/workflows/weekly-deploy-customversion.yml new file mode 100644 index 000000000..50de5ec45 --- /dev/null +++ b/.github/workflows/weekly-deploy-customversion.yml @@ -0,0 +1,92 @@ +name: Weekly Android app deploy + +on: + schedule: + # Gotta wait until contributors.json is updated + - cron: '1 0 * * 1' # Every Monday at 1AM + + # Allow manual trigger + workflow_dispatch: + +concurrency: + group: 'Weekly-deploy' + cancel-in-progress: false # Don't cancel any in-progress runs in this group + +jobs: + setup: + runs-on: ubuntu-latest + # Set date as a variable + outputs: + BUILD_DATE: ${{ steps.date.outputs.date }} + APK_FILENAME: app-foss-release-${{ steps.date.outputs.date }}.apk + + steps: + - name: Get date + id: date + run: echo "::set-output name=date::$(date +'%Y%m%d')" + + build-apk: + needs: setup + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4.2.1 + + - name: Setup Java 21 + uses: actions/setup-java@v4.4.0 + with: + java-version: "21" + distribution: "corretto" + cache: gradle + + - name: Build with Gradle + run: ./gradlew assembleDebug + + - name: Rename to match build number + run: | + mkdir -p app + + cp composeApp/build/outputs/apk/foss/debug/app-foss-debug.apk app/${{ needs.setup.outputs.APK_FILENAME }} + + - name: Upload built artifact for next job + uses: actions/upload-artifact@v4.4.1 + with: + name: ${{ needs.setup.outputs.APK_FILENAME }} + path: app/${{ needs.setup.outputs.APK_FILENAME }} + + + upload-to-release: + needs: [setup, build-apk] + runs-on: ubuntu-latest + + steps: + - name: Retrieve APK + uses: actions/download-artifact@v4.1.8 + with: + name: ${{ needs.setup.outputs.APK_FILENAME }} + + - name: Upload built APK to release + uses: softprops/action-gh-release@v2 + with: + files: ${{ needs.setup.outputs.APK_FILENAME }} + prerelease: true + name: RiMusic Weekly Build | Custom Version | ${{ needs.setup.outputs.BUILD_DATE }} + tag_name: "custom-version" + body: | +
+ +

RiMusic Custom Version

+

Remember, the custom version is not an official release.

+
+ + ## ❗ CUSTOM VERSION + **WARNING**: This custom version is not an official release, it only serves to anticipate fix or feature pending the official release. Downloading only if invited by the developer, it may damage your current installation. + + ## 📲 Installation + + > Android treats this installation as a different app and will not remove old RiMusic app. + + Download [HERE](https://github.com/knighthat/RiMusic/releases/download/custom-version/${{ needs.setup.outputs.APK_FILENAME }}) or use link down below + + token: ${{ secrets.RELEASE_TOKEN }} + generate_release_notes: true diff --git a/README.md b/README.md index f4a7f94fa..9b28c3a70 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,7 @@ ## ❗ CUSTOM VERSION WARNING, the custom version is not an official release, download only if invited by the developer! -[Go to custom version](https://github.com/fast4x/RiMusic/tree/master/customVersion) +[Go to custom version](https://github.com/fast4x/RiMusic/releases/tag/custom-version) ## ❓ FAQs - See [Wiki page FAQs](https://github.com/fast4x/RiMusic/wiki/FAQs) From ebb67f4871596070f35c932c8f5e2068a0204b37 Mon Sep 17 00:00:00 2001 From: knighthat Date: Wed, 9 Oct 2024 07:20:05 -0500 Subject: [PATCH 2/2] changed schedule to Tuesday --- .github/workflows/weekly-deploy-customversion.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/weekly-deploy-customversion.yml b/.github/workflows/weekly-deploy-customversion.yml index 50de5ec45..e4bcf9631 100644 --- a/.github/workflows/weekly-deploy-customversion.yml +++ b/.github/workflows/weekly-deploy-customversion.yml @@ -3,7 +3,7 @@ name: Weekly Android app deploy on: schedule: # Gotta wait until contributors.json is updated - - cron: '1 0 * * 1' # Every Monday at 1AM + - cron: '0 0 * * 2' # Every Tuesday at 0AM # Allow manual trigger workflow_dispatch: