mirror of
https://github.com/eosswedenorg/antelope-keygen
synced 2026-06-16 03:44:56 +02:00
153 lines
4.7 KiB
YAML
153 lines
4.7 KiB
YAML
name: Package
|
|
|
|
on:
|
|
release:
|
|
types: [ created ]
|
|
|
|
jobs:
|
|
# Debian package for ubuntu.
|
|
ubuntu:
|
|
strategy:
|
|
matrix:
|
|
os: [ ubuntu-20.04, ubuntu-22.04 ]
|
|
component: [ cli, gui ]
|
|
include:
|
|
- component: cli
|
|
build-opts: --cli --no-gui -t Release --pkg-type deb
|
|
- component: gui
|
|
build-opts: --no-cli --gui -t Release --pkg-type deb
|
|
name: DEB ${{matrix.os}} (${{matrix.component}})
|
|
runs-on: ${{matrix.os}}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Qt
|
|
if: startsWith(matrix.component, 'gui')
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
if [ "${{matrix.os}}" == "ubuntu-22.04" ]; then
|
|
sudo apt-get install qtbase5-dev=5.15.3+dfsg-2ubuntu0.2
|
|
else :
|
|
sudo apt-get install qt5-default=5.12.8+dfsg-0ubuntu2.1
|
|
fi
|
|
|
|
- name: Package
|
|
id: package
|
|
run: |
|
|
./build.sh ${{matrix.build-opts}}
|
|
FILE=$(ls build/*.deb | head -1)
|
|
echo "filename=$FILE" >> "$GITHUB_OUTPUT"
|
|
echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_name: ${{ steps.package.outputs.name }}
|
|
asset_path: ${{ steps.package.outputs.filename }}
|
|
asset_content_type: application/x-deb
|
|
|
|
# RPM package for redhat based systems.
|
|
rpm:
|
|
strategy:
|
|
matrix:
|
|
container:
|
|
- name: "fedora:36"
|
|
deps:
|
|
gcc-12.2.1-4.fc36.x86_64
|
|
gcc-c++-12.2.1-4.fc36.x86_64
|
|
cmake-3.26.3-1.fc36.x86_64
|
|
openssl1.1-devel-1.1.1q-1.fc36.x86_64
|
|
qt: qt5-qtbase-devel-5.15.3-1.fc36.x86_64
|
|
|
|
- name: "fedora:38"
|
|
deps:
|
|
gcc-13.2.1-1.fc38.x86_64
|
|
gcc-c++-13.2.1-1.fc38.x86_64
|
|
cmake-3.26.2-1.fc38.x86_64
|
|
openssl-devel-1:3.0.9-2.fc38.x86_64
|
|
qt: qt5-qtbase-devel-5.15.10-1.fc38.x86_64
|
|
component: [ cli, gui ]
|
|
include:
|
|
- component: cli
|
|
build-opts: --cli --no-gui -t Release --pkg-type rpm
|
|
- component: gui
|
|
build-opts: --no-cli --gui -t Release --pkg-type rpm
|
|
name: RPM ${{matrix.container.name}} (${{matrix.component}})
|
|
runs-on: ubuntu-latest
|
|
container: ${{ matrix.container.name }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Dependancies
|
|
run: |
|
|
sudo dnf install -y util-linux rpmdevtools git ${{ matrix.container.deps }}
|
|
|
|
- name: Qt
|
|
if: startsWith(matrix.component, 'gui')
|
|
shell: bash
|
|
run: |
|
|
sudo dnf install -y ${{ matrix.container.qt }}
|
|
|
|
- name: Package
|
|
id: package
|
|
run: |
|
|
./build.sh ${{matrix.build-opts}}
|
|
FILE=$(ls build/*.rpm | head -1)
|
|
echo "filename=$FILE" >> "$GITHUB_OUTPUT"
|
|
echo "name=$(basename $FILE)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Upload
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_name: ${{ steps.package.outputs.name }}
|
|
asset_path: ${{ steps.package.outputs.filename }}
|
|
asset_content_type: application/octet-stream
|
|
|
|
# Windows installer
|
|
windows:
|
|
strategy:
|
|
matrix:
|
|
arch: [ Win32, x64 ]
|
|
include:
|
|
- arch: Win32
|
|
qt-arch: win32_msvc2015
|
|
- arch: x64
|
|
qt-arch: win64_msvc2015_64
|
|
name: Windows (${{matrix.arch}})
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Qt
|
|
uses: jurplel/install-qt-action@v3
|
|
with:
|
|
arch: ${{ matrix.qt-arch }}
|
|
version: '5.11.0'
|
|
|
|
- name: Configure
|
|
run: cmake -A ${{matrix.arch}} -DCOMPONENT_GUI=ON -DCOMPONENT_CLI=ON -D CMAKE_BUILD_TYPE=Release -D CPACK_GENERATOR=NSIS -S . -B build
|
|
|
|
- name: Package
|
|
id: package
|
|
run: |
|
|
cmake --build build --config Release --target package
|
|
$FILE=(ls build/*.exe)
|
|
echo "::set-output name=filename::$FILE"
|
|
echo "::set-output name=name::$(([io.fileinfo]"$FILE").basename).exe"
|
|
|
|
- name: Upload
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ github.event.release.upload_url }}
|
|
asset_name: ${{ steps.package.outputs.name }}
|
|
asset_path: ${{ steps.package.outputs.filename }}
|
|
asset_content_type: application/vnd.microsoft.portable-executable
|