Skip to content

Release v0.0.3

Release v0.0.3 #40

Workflow file for this run

name: Android CI
on:
release:
types: [ created ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: gradle
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleRelease
# - name: Upload APK to GitHub Release
# if: success() # Only proceed if the build is successful
# id: create_release
# uses: actions/[email protected]
# with:
# tag_name: ${{ github.event.release.tag_name }} # You can change this to use a version number from your Gradle file
# release_name: ${{ github.event.release.tag_name }}
# body_path: release_note.md
# prerelease: ${{ github.event.release.prerelease }}
# env:
# GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
- name: Upload APK asset to Release
if: github.event_name == 'release' && github.event.action == 'created'
uses: actions/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: app/build/outputs/apk/release/uuMusic-${{ github.event.release.tag_name }}.apk
asset_name: "uuMusic-${{ github.event.release.tag_name }}" # You can modify the name as needed
asset_content_type: application/vnd.android.package-archive
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}