You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.8 KiB
52 lines
1.8 KiB
name: GitHub Release with APKs
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build:
|
|
if: github.repository == 'android/nowinandroid'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 120
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: ./.github/actions/setup-kvm
|
|
- uses: ./.github/actions/setup-java
|
|
- uses: ./.github/actions/setup-gradle
|
|
with:
|
|
cache-encryption-key: ${{ secrets.GRADLE_ENCRYPTION_KEY }}
|
|
- uses: ./.github/actions/setup-gradle-properties
|
|
- uses: ./.github/actions/setup-gradle-managed-devices
|
|
|
|
- name: Build release variant including baseline profile generation
|
|
run: ./gradlew :app:assembleDemoRelease
|
|
-Pandroid.testInstrumentationRunnerArguments.androidx.benchmark.enabledRules=BaselineProfile
|
|
-Pandroid.testoptions.manageddevices.emulator.gpu="swiftshader_indirect"
|
|
-Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
|
|
-Pandroid.experimental.androidTest.numManagedDeviceShards=1
|
|
-Pandroid.experimental.testOptions.managedDevices.maxConcurrentDevices=1
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: ${{ github.ref }}
|
|
draft: true
|
|
prerelease: false
|
|
|
|
- name: Upload app
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: app/build/outputs/apk/demo/release/app-demo-release.apk
|
|
asset_name: app-demo-release.apk
|
|
asset_content_type: application/vnd.android.package-archive
|