ci:add github action yml configuration for automatical build & releas… #1
This file contains 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 kantv | |
on: | |
workflow_dispatch: | |
inputs: | |
release_tag: | |
required: false | |
type: string | |
push: | |
branches: | |
- master | |
# 添加忽略路径,避免文档更新等触发构建 | |
paths-ignore: | |
- '**.md' | |
- 'docs/**' | |
- '.gitignore' | |
release: | |
types: [published] | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout code | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
fetch-depth: '0' | |
- name: build android release | |
run: | | |
source build/envsetup.sh | |
./build/prebuild-download.sh | |
lunch 1 | |
./build-all.sh android | |
- name: upload arm64-v8a release | |
uses: actions/upload-artifact@v4 | |
if: ${{ success() }} | |
with: | |
name: arm64-v8a release apk | |
compression-level: 0 | |
retention-days: 3 | |
path: ${{ github.workspace }}/cdeosplayer/kantv/build/outputs/apk/all64/release/kantv-release-*-signed.apk | |
- name: upload arm64-v8a release to release | |
uses: svenstaro/upload-release-action@v2 | |
if: github.event_name == 'release' | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: ${{ github.workspace }}/cdeosplayer/kantv/build/outputs/apk/all64/release/kantv-release-*-signed.apk | |
tag: ${{ github.ref }} | |
file_glob: true | |