forked from GodotVR/godot_openxr_vendors
-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (59 loc) · 2.14 KB
/
Copy pathbuild-addon-on-push.yml
File metadata and controls
63 lines (59 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Workflow to automatically create the godot openxr loaders addon
name: Build on push
on:
[push, pull_request]
jobs:
build:
name: Assembling artifacts
runs-on: ubuntu-20.04
# Note, to satisfy the asset library we need to make sure our zip files have a root folder
# this is why we checkout into aar and build into asset
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: aar
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: 11
distribution: 'adopt'
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Create Godot OpenXR loader AARs
run: |
cd aar
./gradlew build
cd ..
# GODOT 4.2 ADDON GENERATION SECTION
- name: Create Godot OpenXR loader Addon
run: |
mkdir asset
cp -r aar/demo/addons asset
cp aar/CHANGES.md asset/addons/godotopenxr/GodotOpenXRLoaders_CHANGES.md
- name: Adding vendor licences
run: |
cp aar/godotopenxrmeta/LICENSE.txt asset/addons/godotopenxr/.export/meta/
cp aar/godotopenxrpico/src/main/jniLibs/arm64-v8a/README.md asset/addons/godotopenxr/.export/pico/LICENSE.md
cp aar/godotopenxrkhr/LICENSE asset/addons/godotopenxr/.export/khr/LICENSE
- name: Create Godot OpenXR loader addon artifact
uses: actions/upload-artifact@v3
with:
name: GodotOpenXRLoadersAddon
path: |
asset
- name: Zip addon
run: |
zip -qq -r godotopenxrloadersaddon.zip asset
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
- name: Create and upload asset
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "godotopenxrloadersaddon.zip"
omitNameDuringUpdate: true
omitBodyDuringUpdate: true
omitDraftDuringUpdate: true
omitPrereleaseDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')