mirror of
https://github.com/upa/mscp.git
synced 2026-02-04 03:24:58 +08:00
libssh 0.10.6 has a regression in IPv6 parsing, so we pick stable-0.10 that includes the fixes. https://gitlab.com/libssh/libssh-mirror/-/issues/227
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
name: release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
BUILD_TYPE: Release
|
|
|
|
jobs:
|
|
build-and-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: patch to libssh
|
|
run: patch -d libssh -p1 < patch/libssh-0.10.6-2-g6f1b1e76.patch
|
|
|
|
# TODO: just building docker does not require packages. fix CMakeLists
|
|
- name: install build dependency
|
|
run: sudo ./scripts/install-build-deps.sh
|
|
|
|
- name: Configure Cmake
|
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
|
|
|
|
- name: Build Containers
|
|
run: make -C ${{github.workspace}}/build docker-build-all
|
|
|
|
- name: Test
|
|
run: make -C ${{github.workspace}}/build docker-test-all
|
|
|
|
- name: Retrieve packages from containers
|
|
run: make -C ${{github.workspace}}/build docker-pkg-all
|
|
|
|
- name: Copy mscp single binary built inside Alpine
|
|
run: cp ${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static ${{github.workspace}}/build/mscp.linux.x86.static
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
${{github.workspace}}/build/mscp_ubuntu-20.04-x86_64.deb
|
|
${{github.workspace}}/build/mscp_ubuntu-22.04-x86_64.deb
|
|
${{github.workspace}}/build/mscp_rocky-8.8-x86_64.rpm
|
|
${{github.workspace}}/build/mscp_almalinux-8.8-x86_64.rpm
|
|
${{github.workspace}}/build/mscp_alpine-3.17-x86_64.static
|
|
${{github.workspace}}/build/mscp.linux.x86.static
|
|
|
|
source-release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: true
|
|
|
|
- name: patch to libssh
|
|
run: patch -d libssh -p1 < patch/libssh-0.10.6-2-g6f1b1e76.patch
|
|
|
|
- name: Set variables
|
|
run: |
|
|
VER=$(cat VERSION)
|
|
echo "VERSION=$VER" >> $GITHUB_ENV
|
|
|
|
- name: archive
|
|
run: |
|
|
cd ..
|
|
cp -r mscp mscp-${{env.VERSION}}
|
|
tar zcvf mscp-${{env.VERSION}}.tar.gz --exclude-vcs mscp-${{env.VERSION}}
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
files: |
|
|
${{github.workspace}}/../mscp-${{env.VERSION}}.tar.gz
|