Skip to content

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #35

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows

Bump actions/download-artifact from 2 to 4.1.7 in /.github/workflows #35

Workflow file for this run

name: Android CI
on:
push:
branches:
- master
- work
- AddGaode
- OpenCV-Landing
pull_request:
branches:
- master
- work
- AddGaode
- OpenCV-Landing
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2
- name: generate lfs file list
run: git lfs ls-files -l | cut -d' ' -f1 | sort > .lfs-assets-id
- name: restore lfs cache
uses: actions/cache@v2
id: lfs-cache
with:
path: .git/lfs
key: ${{ runner.os }}-lfs-${{ hashFiles('.lfs-assets-id') }}-v1
- name: pull lfs files
run: git lfs pull
- name: set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew wrapper --gradle-version=6.7.1
./gradlew build
- name: Upload APK
uses: actions/upload-artifact@v2
with:
name: apk
path: app/build/outputs/apk/debug/app-debug.apk
release:
name: Release APK
needs: build
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Download APK from build
uses: actions/[email protected]
with:
name: apk
- name: Create Release
id: create_release
uses: actions/create-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
- name: Upload Release APK
id: upload_release_asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: apk/app-debug.apk
asset_name: rosettadrone.apk
asset_content_type: application/zip