-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (60 loc) · 2.05 KB
/
release.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
---
name: "tagged-release"
on:
push:
tags:
- "v*.*.*"
jobs:
tagged-release:
name: "Tagged Release"
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Install third party dependencies
run: sudo apt update && sudo apt install -y build-essential zlib1g-dev libsqlite3-dev libz-dev curl gem ruby unzip p7zip-full unrar-free git libgcrypt-dev
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Git Clone LDB
uses: actions/checkout@v3
with:
repository: scanoss/ldb
path: ldb
fetch-depth: 0
- name: Build & Install ldb
run: cd ldb && git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && make all && sudo make install
- name: Build engine
run: |
make all
mkdir -p ./artifacts
cp scanoss ./artifacts/scanoss
cp LICENSE ./artifacts/LICENSE
echo "Produced artifact at ${PWD}/artifacts/scanoss"
- name: 'Tar files'
run: tar czvf scanoss-engine-${{ github.ref_name }}-linux-amd64.tar.gz -C ./artifacts/ .
- name: Prepare deb package
id: build_deb
run: |
make prepare_deb_package
echo "debpkg_file_name=$(ls *.deb)" >> $GITHUB_OUTPUT
- name: Prepare rpm package
run: |
make prepare_rpm_package
echo "rpmpkg_file_name=$(ls dist/rpm/RPMS/x86_64/*.rpm)" >> $GITHUB_OUTPUT
- name: Show the artifacts
# Items placed in /artifacts in the container will be in
# ${PWD}/artifacts on the host.
run: |
ls -al "${PWD}/artifacts"
ls -al "${PWD}"
ls -al "${PWD}/dist/rpm/RPMS/x86_64/"
- name: Create Draft Release ${{ github.ref_type }} - ${{ github.ref_name }}
if: github.ref_type == 'tag'
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
./**.tar.gz
./*.deb
./dist/rpm/RPMS/x86_64/*.rpm