Update: upload_artifact to v4 due to deprecation

https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
This commit is contained in:
Nicholas Wallace 2025-01-29 20:52:41 -07:00
parent b066df4efc
commit 5d29efe1d5

View file

@ -13,41 +13,41 @@ jobs:
main: main:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: checkout sources - name: checkout sources
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: use Node.js 20.x - name: use Node.js 20.x
uses: actions/setup-node@v3 uses: actions/setup-node@v3
with: with:
node-version: 20 node-version: 20
- name: Set up Java - name: Set up Java
uses: actions/setup-java@v2 uses: actions/setup-java@v2
with: with:
distribution: "temurin" distribution: 'temurin'
java-version: 17 java-version: 17
- name: install dependencies - name: install dependencies
run: npm ci run: npm ci
- name: build Nuxt project - name: build Nuxt project
run: npm run generate run: npm run generate
- name: copy to Android project - name: copy to Android project
run: npx cap sync run: npx cap sync
- name: build Android app - name: build Android app
run: ./android/gradlew assembleDebug -p android --no-daemon run: ./android/gradlew assembleDebug -p android --no-daemon
- name: rename apk - name: rename apk
working-directory: android/app/build/outputs/apk/debug/ working-directory: android/app/build/outputs/apk/debug/
run: | run: |
build="$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)" build="$(date +%Y%m%d-%H%M%S)-$(git rev-parse --short HEAD)"
name="audiobookshelf-${build}.apk" name="audiobookshelf-${build}.apk"
mv -v app-debug.apk "${name}" mv -v app-debug.apk "${name}"
- name: upload app - name: upload app
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: audiobookshelf-apk name: audiobookshelf-apk
path: android/app/build/outputs/apk/debug/*.apk path: android/app/build/outputs/apk/debug/*.apk