CI: replace unsupported upload/download-artifact@v4 with shared host dir
Forgejo does not support @actions/artifact v2 (GHES limitation). Self-hosted jobs share /tmp/ci-artifacts between jobs.
This commit is contained in:
parent
7c0d817018
commit
f87443148f
2 changed files with 18 additions and 25 deletions
|
|
@ -18,15 +18,14 @@ jobs:
|
||||||
- name: Copy firmware to Android assets
|
- name: Copy firmware to Android assets
|
||||||
run: bash tools/copy_firmware.sh
|
run: bash tools/copy_firmware.sh
|
||||||
|
|
||||||
- name: Upload firmware artifact
|
- name: Stage firmware for android job
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
with:
|
rm -rf /tmp/ci-artifacts/firmware
|
||||||
name: firmware
|
mkdir -p /tmp/ci-artifacts/firmware
|
||||||
path: |
|
cp .pio/build/m5stack-atoms3r/firmware.bin /tmp/ci-artifacts/firmware/
|
||||||
.pio/build/m5stack-atoms3r/firmware.bin
|
cp .pio/build/m5stack-atoms3r/bootloader.bin /tmp/ci-artifacts/firmware/
|
||||||
.pio/build/m5stack-atoms3r/bootloader.bin
|
cp .pio/build/m5stack-atoms3r/partitions.bin /tmp/ci-artifacts/firmware/
|
||||||
.pio/build/m5stack-atoms3r/partitions.bin
|
cp android/app/src/main/assets/firmware/boot_app0.bin /tmp/ci-artifacts/firmware/
|
||||||
android/app/src/main/assets/firmware/boot_app0.bin
|
|
||||||
|
|
||||||
android:
|
android:
|
||||||
needs: firmware
|
needs: firmware
|
||||||
|
|
@ -34,10 +33,12 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Download firmware
|
- name: Restore firmware from firmware job
|
||||||
uses: actions/download-artifact@v4
|
run: |
|
||||||
with:
|
cp /tmp/ci-artifacts/firmware/boot_app0.bin android/app/src/main/assets/firmware/
|
||||||
name: firmware
|
cp /tmp/ci-artifacts/firmware/firmware.bin android/app/src/main/assets/firmware/
|
||||||
|
cp /tmp/ci-artifacts/firmware/bootloader.bin android/app/src/main/assets/firmware/
|
||||||
|
cp /tmp/ci-artifacts/firmware/partitions.bin android/app/src/main/assets/firmware/
|
||||||
|
|
||||||
- name: Build debug APK
|
- name: Build debug APK
|
||||||
working-directory: android
|
working-directory: android
|
||||||
|
|
@ -45,8 +46,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
ANDROID_HOME: ${{ vars.ANDROID_HOME || '/opt/android-sdk' }}
|
ANDROID_HOME: ${{ vars.ANDROID_HOME || '/opt/android-sdk' }}
|
||||||
|
|
||||||
- name: Upload debug APK
|
- name: Stage APK
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
with:
|
mkdir -p /tmp/ci-artifacts
|
||||||
name: app-debug
|
cp android/app/build/outputs/apk/debug/app-debug.apk /tmp/ci-artifacts/
|
||||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@ jobs:
|
||||||
|
|
||||||
- name: Decode keystore
|
- name: Decode keystore
|
||||||
run: echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > android/keystore/sylda.jks
|
run: echo "${{ secrets.KEYSTORE_B64 }}" | base64 -d > android/keystore/sylda.jks
|
||||||
if: env.KEYSTORE_B64 != ''
|
|
||||||
|
|
||||||
- name: Write signing.properties
|
- name: Write signing.properties
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -46,12 +45,6 @@ jobs:
|
||||||
cd release/artifacts
|
cd release/artifacts
|
||||||
sha256sum * > checksums.txt
|
sha256sum * > checksums.txt
|
||||||
|
|
||||||
- name: Upload release artifacts
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: release
|
|
||||||
path: release/artifacts/*
|
|
||||||
|
|
||||||
- name: Create Forgejo release
|
- name: Create Forgejo release
|
||||||
uses: https://git.eddydevink.nl/api/packages/eddy/actions/forgejo-release@v1
|
uses: https://git.eddydevink.nl/api/packages/eddy/actions/forgejo-release@v1
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue