Build unsigned release APK on master #7
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 unsigned release APK on master" | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: 'master' | |
| - uses: actions/setup-java@v5 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| cache: 'gradle' | |
| - name: "Build release APK" | |
| run: ./gradlew assembleRelease --stacktrace | |
| - name: "Rename APK" | |
| run: | | |
| VERSION_NAME="$(jq -r ".elements[0].versionName" "app/build/outputs/apk/release/output-metadata.json")" | |
| echo "Version name: $VERSION_NAME" >> "$GITHUB_STEP_SUMMARY" | |
| echo '```json' >> "$GITHUB_STEP_SUMMARY" | |
| cat "app/build/outputs/apk/release/output-metadata.json" >> "$GITHUB_STEP_SUMMARY" | |
| echo >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" | |
| # assume there is only one APK in that folder | |
| mv app/build/outputs/apk/release/*.apk "app/build/outputs/apk/release/NewPipe_v$VERSION_NAME.apk" | |
| - name: "Upload APK" | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: app | |
| path: app/build/outputs/apk/release/*.apk |