-
-
Notifications
You must be signed in to change notification settings - Fork 128
153 lines (140 loc) · 4.65 KB
/
upload-to-github-pages.yml
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
149
150
151
152
153
name: HyperHDR Package Build (Github Pages Repo)
on:
push:
tags:
- '*'
env:
USE_CACHE: "0"
RESET_CACHE: "0"
jobs:
######################################
###### Upload to HyperHDR repo #######
######################################
Linux:
name: ${{ matrix.niceName }} ${{ matrix.linuxVersion }} (${{ matrix.arch }})
runs-on: ubuntu-22.04
strategy:
matrix:
niceName: [ Debian ]
linuxVersion: [ bullseye, bookworm ]
dockerImage: [ x86_64, arm-32bit-armv6l, arm-64bit-aarch64 ]
include:
- dockerImage: x86_64
dockerName: Debian (amd64)
arch: amd64
platform: linux
- dockerImage: arm-32bit-armv6l
dockerName: Debian (armhf)
arch: armhf
platform: rpi
- dockerImage: arm-64bit-aarch64
dockerName: Debian (arm64)
arch: arm64
platform: rpi
- dockerImage: x86_64
linuxVersion: ArchLinux
dockerName: Arch Linux (x86_64)
arch: amd64
platform: linux
niceName: ""
- dockerImage: x86_64
linuxVersion: jammy
dockerName: Ubuntu 22.04 LTS (x86_64)
arch: amd64
platform: linux
niceName: Ubuntu 22.04 LTS
- dockerImage: x86_64
linuxVersion: noble
dockerName: Ubuntu 24.04 LTS (x86_64)
arch: amd64
platform: linux
niceName: Ubuntu 24.04 LTS
- dockerImage: x86_64
linuxVersion: oracular
dockerName: Ubuntu 24.10 (x86_64)
arch: amd64
platform: linux
niceName: Ubuntu 24.10
- dockerImage: x86_64
linuxVersion: Fedora_41
dockerName: Fedora 41 (x86_64)
arch: amd64
platform: linux
niceName: Fedora 41
steps:
# checkout
- uses: actions/[email protected]
with:
submodules: true
# generate cache id
- name: Prepare ccache timestamp
if: env.USE_CACHE == '1'
id: ccache_cache_timestamp
shell: cmake -P {0}
run: |
string(TIMESTAMP current_date "%Y-%m-%d-%H-%M-%S" UTC)
file(APPEND "$ENV{GITHUB_OUTPUT}" "timestamp=${current_date}")
# download cache
- name: ccache cache files
if: ( env.USE_CACHE == '1' )
uses: actions/[email protected]
with:
path: .ccache
key: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-${{ steps.ccache_cache_timestamp.outputs.timestamp }}
restore-keys: ${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}-ccache-
- name: Build packages
env:
DOCKER_IMAGE: ${{ matrix.dockerImage }}
DOCKER_TAG: ${{ matrix.linuxVersion }}
DOCKER_NAME: ${{ matrix.dockerName }}
PLATFORM: ${{ matrix.platform }}
USE_CCACHE: ${{ env.USE_CACHE }}
RESET_CACHE: ${{ env.RESET_CACHE }}
USE_STANDARD_INSTALLER_NAME: true
shell: bash
run: |
./build.sh
# deploy the package
- name: Get destination path
run: |
echo "REPO_DIR=repo/pool/${{ matrix.linuxVersion }}" >> $GITHUB_ENV
- name: Move installers
run: |
mkdir -p ${{ env.REPO_DIR }}
mkdir -p repo/others
mv deploy/Hyper*.deb ${{ env.REPO_DIR }} ||:
mv deploy/Hyper*.rpm repo/others ||:
mv deploy/Hyper*.zst repo/others ||:
rm -r repo/pool/ArchLinux ||:
- name: Upload artifacts from commit
uses: actions/[email protected]
with:
name: release-artifact-${{ matrix.linuxVersion }}-${{ matrix.dockerImage }}
path: repo
Upload:
name: Upload to Github Pages
runs-on: ubuntu-22.04
needs: [Linux]
steps:
# Download artifacts from previous build process
- uses: actions/[email protected]
with:
submodules: false
- name: Download artifacts
uses: actions/[email protected]
with:
path: repo
pattern: release-artifact-*
merge-multiple: true
- name: Display structure of artifacts
run: ls -R repo
- name: Deploy the packages
uses: JamesIves/[email protected]
with:
repository-name: awawa-dev/awawa-dev.github.io
branch: upload
folder: repo
target-folder: repo
clean: false
commit-message: Release for ${{github.ref_name}}
ssh-key: ${{ secrets.UPLOADER_KEY }}