2022-10-22 20:30:58 +02:00
|
|
|
name: Publish Release
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
channel:
|
|
|
|
description: 'Release Channel'
|
|
|
|
required: true
|
|
|
|
default: 'releases'
|
|
|
|
type: choice
|
|
|
|
options:
|
|
|
|
- releases
|
2022-10-22 21:09:59 +02:00
|
|
|
- releases-staging
|
2022-10-22 20:30:58 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
mkdoc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Install packages
|
|
|
|
run: sudo apt -y update && sudo apt -y install libssl-dev unixodbc-dev redis-server libmysqlclient-dev libpq-dev
|
|
|
|
-
|
|
|
|
name: Install SSH key
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
|
|
|
|
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
|
2022-10-22 20:59:08 +02:00
|
|
|
chmod go-rwx ~/.ssh/id_rsa
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Build documentation
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
export POCO_BASE=`pwd`
|
|
|
|
export PATH=$POCO_BASE/release/script:$PATH
|
|
|
|
export LD_LIBRARY_PATH=$POCO_BASE/stage/tools/lib/Linux/x86_64
|
2022-10-22 20:59:08 +02:00
|
|
|
mkdoc all
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Copy to web server
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
read VERSION <VERSION
|
2022-10-22 20:44:34 +02:00
|
|
|
ssh poco@pocoproject.org mkdir -p staging/releases/poco-$VERSION
|
2022-10-22 20:30:58 +02:00
|
|
|
scp releases/poco-*-doc.tar.gz releases/poco-*-doc.zip poco@pocoproject.org:staging/releases/poco-$VERSION
|
|
|
|
|
|
|
|
mkrelease_win:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Install packages
|
|
|
|
run: sudo apt-get update && sudo apt-get -y install dos2unix
|
|
|
|
-
|
|
|
|
name: Install SSH key
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
|
|
|
|
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
|
2022-10-22 20:36:23 +02:00
|
|
|
chmod go-rwx ~/.ssh/id_rsa
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Build release package
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
export POCO_BASE=`pwd`
|
|
|
|
export PATH=$POCO_BASE/release/script:$PATH
|
2022-10-22 20:59:08 +02:00
|
|
|
mkrel -c unix2dos
|
2022-10-22 21:09:59 +02:00
|
|
|
mkrel -c unix2dos all
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Copy to web server
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
read VERSION <VERSION
|
2022-10-22 20:44:34 +02:00
|
|
|
ssh poco@pocoproject.org mkdir -p staging/releases/poco-$VERSION
|
2022-10-22 20:30:58 +02:00
|
|
|
scp releases/poco-*.zip poco@pocoproject.org:staging/releases/poco-$VERSION
|
|
|
|
|
|
|
|
mkrelease:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
-
|
|
|
|
name: Install SSH key
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
|
|
|
|
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
|
2022-10-22 20:36:23 +02:00
|
|
|
chmod go-rwx ~/.ssh/id_rsa
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Build release package
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
export POCO_BASE=`pwd`
|
|
|
|
export PATH=$POCO_BASE/release/script:$PATH
|
2022-10-22 20:59:08 +02:00
|
|
|
mkrel
|
|
|
|
mkrel all
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Copy to web server
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
read VERSION <VERSION
|
2022-10-22 20:44:34 +02:00
|
|
|
ssh poco@pocoproject.org mkdir -p staging/releases/poco-$VERSION
|
2022-10-22 20:30:58 +02:00
|
|
|
scp releases/poco-*.tar.gz releases/poco-*.tar.bz2 poco@pocoproject.org:staging/releases/poco-$VERSION
|
|
|
|
|
|
|
|
sign_and_publish:
|
|
|
|
runs-on: ubuntu-latest
|
2022-10-22 20:36:23 +02:00
|
|
|
needs: ["mkdoc", "mkrelease_win", "mkrelease"]
|
2022-10-22 20:30:58 +02:00
|
|
|
steps:
|
2022-10-22 20:59:08 +02:00
|
|
|
-
|
|
|
|
name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Install SSH key
|
|
|
|
run: |
|
2022-10-22 20:30:58 +02:00
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
|
|
|
|
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
|
2022-10-22 20:36:23 +02:00
|
|
|
chmod go-rwx ~/.ssh/id_rsa
|
2022-10-22 20:44:34 +02:00
|
|
|
-
|
|
|
|
name: Sign and publish
|
2022-10-22 20:59:08 +02:00
|
|
|
run: |
|
|
|
|
read VERSION <VERSION
|
|
|
|
ssh poco@pocoproject.org ./sign_and_publish.sh $VERSION ${{ inputs.channel }}
|