poco/.github/workflows/publish_release.yml
2022-10-22 20:36:23 +02:00

87 lines
2.9 KiB
YAML

name: Publish Release
on:
workflow_dispatch:
inputs:
relspec:
description: 'Release Specification'
required: true
default: 'all'
type: choice
options:
- ''
- 'all'
channel:
description: 'Release Channel'
required: true
default: 'releases'
type: choice
options:
- releases
- staging
jobs:
mkdoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt -y update && sudo apt -y install libssl-dev unixodbc-dev redis-server libmysqlclient-dev libpq-dev
- run: |
mkdir -p ~/.ssh
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
- run: |
export POCO_BASE=`pwd`
export PATH=$POCO_BASE/release/script:$PATH
export LD_LIBRARY_PATH=$POCO_BASE/stage/tools/lib/Linux/x86_64
mkdoc ${{ inputs.relspec }}
- run: |
read VERSION <VERSION
scp releases/poco-*-doc.tar.gz releases/poco-*-doc.zip poco@pocoproject.org:staging/releases/poco-$VERSION
mkrelease_win:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update && sudo apt-get -y install dos2unix
- run: |
mkdir -p ~/.ssh
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
chmod go-rwx ~/.ssh/id_rsa
- run: |
export POCO_BASE=`pwd`
export PATH=$POCO_BASE/release/script:$PATH
mkrel -c unix2dos ${{ inputs.relspec }}
- run: |
read VERSION <VERSION
scp releases/poco-*.zip poco@pocoproject.org:staging/releases/poco-$VERSION
mkrelease:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: sudo apt-get update && sudo apt-get -y install dos2unix
- run: |
mkdir -p ~/.ssh
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
chmod go-rwx ~/.ssh/id_rsa
- run: |
export POCO_BASE=`pwd`
export PATH=$POCO_BASE/release/script:$PATH
mkrel -c unix2dos ${{ inputs.relspec }}
- run: |
read VERSION <VERSION
scp releases/poco-*.tar.gz releases/poco-*.tar.bz2 poco@pocoproject.org:staging/releases/poco-$VERSION
sign_and_publish:
runs-on: ubuntu-latest
needs: ["mkdoc", "mkrelease_win", "mkrelease"]
steps:
- run: |
mkdir -p ~/.ssh
echo '${{ secrets.POCOPROJECT_ORG_SSH_HOST_KEY }}' >~/.ssh/known_hosts
echo '${{ secrets.POCO_SSH_KEY }}' >~/.ssh/id_rsa
chmod go-rwx ~/.ssh/id_rsa
- run: ssh poco@pocoproject.org ./sign_and_publish.sh