-
-
Notifications
You must be signed in to change notification settings - Fork 15
148 lines (132 loc) · 4.28 KB
/
Pre-Release.yml
File metadata and controls
148 lines (132 loc) · 4.28 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Pre-Release Mod
on:
workflow_dispatch:
env:
module_id: MultiplayerCore
version: 1.0.0-rc.1
ndkname: android-ndk-r24
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
name: Checkout
with:
submodules: true
lfs: true
- name: Install Powershell
run: sudo apt-get install -y powershell
- name: Cache Android NDK
id: cache-ndk
uses: actions/cache@v3
env:
cache-name: cache-ndk
with:
path: ndk
key: ${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-${{ env.ndkname }}
- name: Install Android NDK
if: steps.cache-ndk.outputs.cache-hit != 'true'
run: |
wget -q -O ndk.zip https://dl.google.com/android/repository/${ndkname}-linux-x86_64.zip
unzip -q ndk.zip
mv ${ndkname} ndk
- name: Create ndkpath.txt
run: |
cd ndk
pwd > ${GITHUB_WORKSPACE}/ndkpath.txt
- name: Get QPM
if: steps.cache-qpm.outputs.cache-hit != 'true'
uses: dawidd6/action-download-artifact@v6
with:
github_token: ${{secrets.GITHUB_TOKEN}}
workflow: main.yml
name: QPM-ubuntu-x64
path: QPM
repo: sc2ad/QuestPackageManager
- name: QPM Dependencies Cache
id: cache-qpm-deps
uses: actions/cache@v3
env:
cache-name: cache-qpm-deps
with:
path: QPM_Temp
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('qpm_${{ env.BSVersion }}.json', '.github/BuildMod.yml') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-
${{ runner.os }}-${{ env.cache-name }}
- name: QPM Restore
run: |
chmod +x ./QPM/QPM
./QPM/QPM restore
- name: Check dependency Folders
run: |
echo "Checking extern Folder"
ls -lh ${GITHUB_WORKSPACE}/extern/
echo ""
echo "Checking QPM_Temp Folders"
ls -lh QPM_Temp/
echo ""
echo "Listing beatsaber-hook folder"
ls QPM_Temp/beatsaber-hook/
echo ""
echo "Listing all .so files in QPM_Temp"
find QPM_Temp -type f -name "*.so"
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
./QPM/qpm-rust package edit --version ${{ env.version }}
./QPM/qpm-rust qmod build
pwsh -Command ./build.ps1 --actions
- name: Get Library Name
id: libname
run: |
cd ./libs/arm64-v8a/
pattern="lib${module_id}*.so"
files=( $pattern )
echo "NAME=${files[0]}" >> $GITHUB_OUTPUT
- name: Package QMOD
run: |
cd ${GITHUB_WORKSPACE}
pwsh -Command ./buildQMOD.ps1 -package
# - name: Create Release
# id: create_pre-release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# tag_name: ${{ env.version }}
# release_name: ${{ env.module_id }} ${{ env.version }} for Beat Saber ${{ env.BSVersion }}
# body_path: ./pre-rl-notes.md
# draft: false
# prerelease: true
- name: Copy Debug Artifact
run: |
cd ${GITHUB_WORKSPACE}
cp ./build/debug/${{ steps.libname.outputs.NAME }} ./build/debug_${{ steps.libname.outputs.NAME }}
- name: Create Pre-Release
id: release-qmod
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ env.module_id }} ${{ env.version }} for Beat Saber ${{ env.BSVersion }}
files: |
./${{ env.module_id }}.qmod
./build/${{ steps.libname.outputs.NAME }}
./build/debug_${{ steps.libname.outputs.NAME }}
body_path: ./pre-rl-notes.md
draft: false
prerelease: true
generate_release_notes: true
# - name: Upload QMOD Pre-Release Asset
# id: upload-prerelease-QMOD
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_pre-release.outputs.upload_url }}
# asset_path: ./${{ env.module_id }}.qmod
# asset_name: ${{ env.module_id }}.qmod
# asset_content_type: application/qmod