1
0
Fork 0
mirror of https://github.com/eosswedenorg/libantelope synced 2026-06-16 03:34:56 +02:00
libantelope/.github/workflows/package.yml
Henrik Hautakoski 010cd3a370 Github Actions: skip building/package for Ubuntu 16.04
16.04 only supports libssl 1.0 (officially).
If requested, we could consider supporting it but no point going through the hassle if it has no users.
2020-04-26 13:10:32 +02:00

74 lines
2 KiB
YAML

name: Package
on:
release:
types: [ created ]
jobs:
# Debian package for ubuntu.
ubuntu:
name: Ubuntu 18.04
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v1
- name: Configure
run: cmake -DCPACK_GENERATOR=DEB -B build
- name: Package
id: package
run: |
cmake --build build --target package
FILE=$(ls build/*.deb | head -1)
echo "::set-output name=filename::$FILE"
echo "::set-output name=name::$(basename $FILE)"
- 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
# Windows zip file
windows:
strategy:
matrix:
arch: [ x86, x64 ]
name: Windows (${{matrix.arch}})
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- name: Configure
run: |
if ("${{matrix.arch}}" -eq "x86") {
$PLATFORM="Win32"
} else {
$PLATFORM="${{matrix.arch}}"
}
cmake -A $PLATFORM -S . -B build
- name: Build
run: cmake --build build --config Release
- name: Package
id: package
run: |
cmake --build build --config Release --target package
$FILE=(ls build/libeosio*.zip)
echo "::set-output name=filename::$FILE"
echo "::set-output name=name::$(([io.fileinfo]"$FILE").basename).zip"
- 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/zip