mirror of
https://github.com/MatsuriDayo/NekoBoxForAndroid.git
synced 2025-12-19 22:50:05 +08:00
release aar file
This commit is contained in:
parent
9c7e0ff353
commit
8b2a42f2d4
105
.github/workflows/release.yml
vendored
105
.github/workflows/release.yml
vendored
@ -11,6 +11,7 @@ on:
|
|||||||
play:
|
play:
|
||||||
description: "Play: If want ignore"
|
description: "Play: If want ignore"
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
libcore:
|
libcore:
|
||||||
name: Native Build (LibCore)
|
name: Native Build (LibCore)
|
||||||
@ -37,6 +38,12 @@ jobs:
|
|||||||
- name: Native Build
|
- name: Native Build
|
||||||
if: steps.cache.outputs.cache-hit != 'true'
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
run: ./run lib core
|
run: ./run lib core
|
||||||
|
- name: Upload LibCore AAR
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: LibCore-AAR
|
||||||
|
path: app/libs/libcore.aar
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build OSS APK
|
name: Build OSS APK
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -76,62 +83,70 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: APKs
|
name: APKs
|
||||||
path: ${{ env.APK }}
|
path: ${{ env.APK }}
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
name: Publish Release
|
name: Publish Release
|
||||||
if: github.event.inputs.publish != 'y'
|
if: github.event.inputs.publish != 'y'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build
|
needs: libcore
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Donwload Artifacts
|
# - name: Download APK Artifacts
|
||||||
|
# uses: actions/download-artifact@v4
|
||||||
|
# with:
|
||||||
|
# name: APKs
|
||||||
|
# path: artifacts
|
||||||
|
- name: Download LibCore AAR
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: APKs
|
name: LibCore-AAR
|
||||||
path: artifacts
|
path: artifacts/libcore
|
||||||
- name: Release
|
- name: Release
|
||||||
run: |
|
run: |
|
||||||
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
wget -O ghr.tar.gz https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz
|
||||||
tar -xvf ghr.tar.gz
|
tar -xvf ghr.tar.gz
|
||||||
mv ghr*linux_amd64/ghr .
|
mv ghr*linux_amd64/ghr .
|
||||||
mkdir apks
|
mkdir -p release
|
||||||
find artifacts -name "*.apk" -exec cp {} apks \;
|
# find artifacts -name "*.apk" -exec cp {} release \;
|
||||||
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" apks
|
find artifacts/libcore -name "*.aar" -exec cp {} release \;
|
||||||
play:
|
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" release
|
||||||
name: Build Play Bundle
|
|
||||||
if: github.event.inputs.play != 'y'
|
# play:
|
||||||
runs-on: ubuntu-latest
|
# name: Build Play Bundle
|
||||||
needs:
|
# if: github.event.inputs.play != 'y'
|
||||||
- libcore
|
# runs-on: ubuntu-latest
|
||||||
steps:
|
# needs:
|
||||||
- name: Checkout
|
# - libcore
|
||||||
uses: actions/checkout@v4
|
# steps:
|
||||||
- name: Golang Status
|
# - name: Checkout
|
||||||
run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
|
# uses: actions/checkout@v4
|
||||||
- name: Libcore Status
|
# - name: Golang Status
|
||||||
run: git ls-files libcore | xargs cat | sha1sum > libcore_status
|
# run: find buildScript libcore/*.sh | xargs cat | sha1sum > golang_status
|
||||||
- name: LibCore Cache
|
# - name: Libcore Status
|
||||||
uses: actions/cache@v4
|
# run: git ls-files libcore | xargs cat | sha1sum > libcore_status
|
||||||
with:
|
# - name: LibCore Cache
|
||||||
path: |
|
# uses: actions/cache@v4
|
||||||
app/libs/libcore.aar
|
# with:
|
||||||
key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
|
# path: |
|
||||||
- name: Gradle cache
|
# app/libs/libcore.aar
|
||||||
uses: actions/cache@v4
|
# key: ${{ hashFiles('.github/workflows/*', 'golang_status', 'libcore_status') }}
|
||||||
with:
|
# - name: Gradle cache
|
||||||
path: ~/.gradle
|
# uses: actions/cache@v4
|
||||||
key: gradle-play-${{ hashFiles('**/*.gradle.kts') }}
|
# with:
|
||||||
- name: Checkout Library
|
# path: ~/.gradle
|
||||||
run: |
|
# key: gradle-play-${{ hashFiles('**/*.gradle.kts') }}
|
||||||
git submodule update --init 'app/*'
|
# - name: Checkout Library
|
||||||
- name: Gradle Build
|
# run: |
|
||||||
run: |
|
# git submodule update --init 'app/*'
|
||||||
echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
# - name: Gradle Build
|
||||||
echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties
|
# run: |
|
||||||
export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
# echo "sdk.dir=${ANDROID_HOME}" > local.properties
|
||||||
./run init action gradle
|
# echo "ndk.dir=${ANDROID_HOME}/ndk/25.0.8775105" >> local.properties
|
||||||
./gradlew bundlePlayRelease
|
# export LOCAL_PROPERTIES="${{ secrets.LOCAL_PROPERTIES }}"
|
||||||
- uses: actions/upload-artifact@v3
|
# ./run init action gradle
|
||||||
with:
|
# ./gradlew bundlePlayRelease
|
||||||
name: AAB
|
# - uses: actions/upload-artifact@v3
|
||||||
path: app/build/outputs/bundle/playRelease/app-play-release.aab
|
# with:
|
||||||
|
# name: AAB
|
||||||
|
# path: app/build/outputs/bundle/playRelease/app-play-release.aab
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user