Skip to content

Commit 2c340be

Browse files
Implement Index Creator and Make a CI
1 parent 418d5a0 commit 2c340be

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed

.github/workflows/build.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Build and Release MiceWine RootFS
2+
3+
on:
4+
push:
5+
branches: "*"
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
15+
- name: "Checkout Repository"
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: "Download All Optional Packages and DXVK/WineD3D/VKD3D"
21+
run: |
22+
./download-external-dependencies.sh
23+
./download-optional-packages.sh
24+
./create-repository-index.sh
25+
26+
- name: "Create Release"
27+
uses: softprops/action-gh-release@v2
28+
with:
29+
name: "MiceWine Repository"
30+
tag_name: default
31+
prerelease: true
32+
files: |
33+
index.json
34+
components/DXVK/*
35+
components/WineD3D/*
36+
components/VKD3D/*
37+
components/Packages/*
38+

create-repository-index.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
getElementFromRat()
3+
{
4+
7z -aoa e "$1" pkg-header &> /dev/zero
5+
6+
echo "$(head -n $2 pkg-header | tail -n 1 | cut -d "=" -f 2)"
7+
8+
rm -f pkg-header
9+
}
10+
11+
printf "{" > index.json
12+
13+
for i in $(find components/ -type f); do
14+
printf " \"$(echo $(basename $i))\": { \"name\": \"$(getElementFromRat $i 1)\", \"category\": \"$(getElementFromRat $i 2)\", \"version\": \"$(getElementFromRat $i 3)\", \"architecture\": \"$(getElementFromRat $i 4)\", \"vkDriverLib\": \"$(getElementFromRat $i 5)\" }, " >> index.json
15+
done
16+
17+
printf "}" >> index.json
18+
19+
sed -i "s/, }/}/" index.json

0 commit comments

Comments
 (0)