Skip to content

Figuring out how to upload multiple artifacts v4 #5

Figuring out how to upload multiple artifacts v4

Figuring out how to upload multiple artifacts v4 #5

name: Build artifacts (no APK signing key for now)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Initially, I wanted to use it to tweak actions/upload-artifact versions from one place
# but I also pulled versions of every action here
env:
Version_Checkout: v4
Version_Setup_java: v4
Version_Upload_artifact: v4
jobs:
build_everything:
name: Build everything
runs-on: ubuntu-latest
steps:
- name: Do checkout (whatever that means)
uses: actions/checkout@${{ env.Version_Checkout }}

Check failure on line 26 in .github/workflows/build_artifacts.yml

View workflow run for this annotation

GitHub Actions / Build artifacts (no APK signing key for now)

Invalid workflow file

The workflow is not valid. .github/workflows/build_artifacts.yml (Line: 26, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.Version_Checkout .github/workflows/build_artifacts.yml (Line: 29, Col: 13): Unrecognized named-value: 'env'. Located at position 1 within expression: env.Version_Setup_java
- name: Setup JDK
uses: actions/setup-java@${{ env.Version_Setup_java }}
with:
distribution: temurin
java-version: 11
- name: Set execution permission for gradlew
run: chmod +x gradlew
- name: Build APK (debug), desktop (lwjgl2 and lwjgl3)
run: |
./gradlew android:assembleDebug
./gradlew desktop:dist
./gradlew desktopLwjgl3:dist
- name: Upload debug APK
uses: actions/upload-artifact@${{ env.Version_Upload_artifact }}
with:
name: app-debug.apk
path: android/build/outputs/apk/debug/android-debug.apk
- name: Upload lwjgl2 dist
uses: actions/upload-artifact@${{ env.Version_Upload_artifact }}
with:
name: app-desktopLwjgl2.jar
path: desktop/build/libs/desktop-1.0.jar
- name: Upload lwjgl3 dist
uses: actions/upload-artifact@${{ env.Version_Upload_artifact }}
with:
name: app-desktopLwjgl3.jar
path: desktopLwjgl3/build/libs/desktopLwjgl3-1.0.jar