-
Notifications
You must be signed in to change notification settings - Fork 243
50 lines (42 loc) · 1.48 KB
/
build-installer.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
name: Build OpenELIS-Global-2 Installer
on:
release:
types: [published]
jobs:
build-installer-and-upload-installer:
runs-on: ubuntu-latest
steps:
- name: Checkout OpenELIS-Global2
uses: actions/checkout@v2
with:
repository: ${{github.repository}}
submodules: recursive
- name: Build installer
run: ./build.sh -ib develop
- name: check installer
run: ls OEInstaller/linux
- name: Find installer file
id: find_file
run: |
# Find the file in OEInstaller/linux with .tar.gz extension
FILE_PATH=$(find OEInstaller/linux -name "*.tar.gz" -print -quit)
if [ -z "$FILE_PATH" ]; then
echo "No .tar.gz file found in OEInstaller/linux directory."
exit 1
fi
echo "File path: $FILE_PATH"
# Extract the file name from the path
FILE_NAME=$(basename "$FILE_PATH")
echo "File name: $FILE_NAME"
# Pass the file path and name to outputs
echo "FILE_PATH=$FILE_PATH" >> $GITHUB_ENV
echo "FILE_NAME=$FILE_NAME" >> $GITHUB_ENV
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.FILE_PATH }}
asset_name: ${{ env.FILE_NAME }}
asset_content_type: application/gzip