Skip to content

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo… #25

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo…

Merge pull request #34 from ShiftLeftSecurity/olof/fix/can-not-run-lo… #25

Workflow file for this run

name: Release AppImage and Exe
on:
push:
tags:
- 'v*'
jobs:
pkg:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Produce pkg
run: |
sudo npm install -g pkg
npm install
pkg -t node14-linux,node14-win,node14-mac package.json --out-path dist
- name: Test pkg
run: |
chmod +x dist/cdxgen*
./dist/cdxgen-linux -v
./dist/cdxgen-linux .
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y python3.8 python3.8-dev python3-pip python3-testresources python3-setuptools patchelf desktop-file-utils libgdk-pixbuf2.0-dev
# Install appimagetool AppImage
sudo wget https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage -O /usr/local/bin/appimagetool
sudo chmod +x /usr/local/bin/appimagetool
sudo pip3 install appimage-builder==0.8.1
mkdir -p appimage-builder-cache
wget https://github.com/AppImage/AppImageKit/releases/download/12/runtime-x86_64 -O appimage-builder-cache/runtime-x86_64
- name: Build AppImage
run: |
appimage-builder --recipe appimage-builder.yml --skip-test
env:
UPDATE_INFO: gh-releases-zsync|AppThreat|cdxgen|latest|*x86_64.AppImage.zsync
- name: Zip pkg
run: |
zip --junk-paths -r cdxgen-dist.zip dist cdxgen-latest-x86_64.AppImage
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: cdxgen-dist.zip
asset_name: cdxgen-dist.zip
asset_content_type: application/octet-stream