Merge pull request #68 from scanoss/5.4.2 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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 | |