Manual Build & Publish Release APK #59
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: Manual Build & Publish Release APK | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: '版本號' | |
| required: true | |
| type: string | |
| jobs: | |
| build-and-release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup JDK | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'temurin' | |
| cache: gradle | |
| - name: Make Gradle executable | |
| run: chmod +x ./gradlew | |
| - name: Build Release APK | |
| run: ./gradlew assembleDebug | |
| - name: Create Release and Upload APK | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.event.inputs.tag }} | |
| files: app/build/outputs/apk/debug/*.apk | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |