Skip to content

Publish

Publish #41

Workflow file for this run

name: Publish
on:
push:
tags:
- 'v*'
jobs:
prepare:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Make release
uses: softprops/action-gh-release@v2
id: create_release
with:
draft: true
prerelease: false
body: ...edit me...
selfhosted:
concurrency: ${{ matrix.remote_host }}
runs-on: [self-hosted, server]
needs: prepare
strategy:
fail-fast: false
matrix:
include:
- remote_host: debian-11
installer: deb
- remote_host: debian-11-arm
installer: deb
- remote_host: debian-11-armhf
installer: deb
- remote_host: freebsd-13.1
installer: bsd
- remote_host: freebsd-14
installer: bsd
steps:
- name: Run remote build
run: |
"$RUNNER_TOOLS_PATH"/run-agent gh-${{ matrix.remote_host }} <<'EOF'
set -e
if [ ! -d work/wsdd-native ]; then
git clone https://github.com/gershnik/wsdd-native.git work/wsdd-native
fi
cd work/wsdd-native
git fetch --all
git fetch -f --prune --tags
git reset --hard ${{ github.sha }}
export GH_TOKEN=${{ secrets.GITHUB_TOKEN }}
if [[ '${{ matrix.installer }}' == 'bsd' ]]; then
mkdir -p out
echo "::group::AMD64"
[ -d "out/amd64" ] && tools/uncache out/amd64
cmake -S . -B out/amd64 -DCMAKE_BUILD_TYPE=RelWithDebInfo
installers/bsd/build.py --upload-results . out/amd64
echo "::endgroup::"
echo "::group::ARM64"
installers/bsd/make-toolchain.py arm64 out/toolchain-arm64
[ -d "out/arm64" ] && tools/uncache out/arm64
cmake -S . -B out/arm64 -DCMAKE_TOOLCHAIN_FILE=out/toolchain-arm64/toolchain.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo
installers/bsd/build.py --arch=aarch64 --upload-results . out/arm64
echo "::endgroup::"
else
[ -d "out" ] && tools/uncache out
cmake -S . -B out -DCMAKE_BUILD_TYPE=RelWithDebInfo
installers/${{ matrix.installer }}/build.py --upload-results . out
fi
EOF
mac:
runs-on: macos-14
needs: prepare
env:
DEVELOPER_DIR: /Applications/Xcode_15.4.app
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Collect System Info
id: system-info
uses: kenchan0130/actions-system-info@master
- name: Cache Build Dir
id: cache-build-dir
uses: actions/cache@v4
with:
path: out
key: ${{ runner.os }}-${{ steps.system-info.outputs.release }}-out
- name: Configure
run: |
[ -d "out" ] && tools/uncache out
cmake -S . -B out \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
"-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64"
- name: Make Distribution
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
export SIGN_CERTIFICATE='${{ secrets.SIGN_CERTIFICATE }}'
export SIGN_CERTIFICATE_PWD='${{ secrets.SIGN_CERTIFICATE_PWD }}'
export KEYCHAIN_PWD='${{ secrets.KEYCHAIN_PWD }}'
export NOTARIZE_USER='${{ secrets.NOTARIZE_USER }}'
export NOTARIZE_PWD='${{ secrets.NOTARIZE_PWD }}'
installers/mac/set-github-keychain
installers/mac/build.py --upload-results . out