-
Notifications
You must be signed in to change notification settings - Fork 1
74 lines (60 loc) · 2.85 KB
/
cloner-package-windows.yaml
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
name: cloner-package-windows
on:
workflow_dispatch:
env:
TERM: linux
VERSION: 2.5.43
jobs:
buildroot:
name: cloner_profile
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Clone ingenic-cloner-archives
run: git clone https://github.com/gtxaspec/ingenic-cloner-archives
- name: Create temporary directory
run: mkdir -p cloner-tmp
- name: Extract 7zip archives
working-directory: cloner-tmp
run: 7z x ../ingenic-cloner-archives/windows/${{ env.VERSION }}/cloner-${{ env.VERSION }}-windows_alpha.zip.tar.7z.000
- name: Extract tar.gz.tar archive
working-directory: cloner-tmp
run: tar -xf cloner-${{ env.VERSION }}-windows_alpha.zip.tar
- name: Extract zip archive
working-directory: cloner-tmp
run: 7z x cloner-${{ env.VERSION }}-windows_alpha.zip
- name: Copy repository data
working-directory: cloner-tmp
run: |
cp -R ../0_Firmware_Root cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha
cp -R ../configs cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha
cp -R ../ddrs cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha
cp -R ../firmwares cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha
- name: Prune unnecessary content
working-directory: cloner-tmp
run: |
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/adb
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/scripts
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/security
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/securitytool
rm -rf cloner-${{ env.VERSION }}-windows_alpha/cloner-${{ env.VERSION }}-windows_alpha/docs
- name: Compress final archive
working-directory: cloner-tmp
run: |
mv cloner-${{ env.VERSION }}-windows_alpha cloner-${{ env.VERSION }}-windows_thingino
tar -cf - cloner-${{ env.VERSION }}-windows_thingino | xz -9 -c > cloner-${{ env.VERSION }}-windows_thingino.tar.xz
echo "ZIP_NAME=$(pwd)/cloner-${{ env.VERSION }}-windows_thingino.tar.xz" >> $GITHUB_ENV
- name: Upload cloner package as artifact
uses: actions/upload-artifact@v4
with:
name: cloner-${{ env.VERSION }}-windows_thingino
path: ${{ env.ZIP_NAME }}
- name: Upload cloner package
if: github.event_name != 'pull_request'
uses: softprops/action-gh-release@master
with:
tag_name: latest
files: ${{ env.ZIP_NAME }}