Skip to content

Merge pull request #2 from array2d/feat/header-only #3

Merge pull request #2 from array2d/feat/header-only

Merge pull request #2 from array2d/feat/header-only #3

Workflow file for this run

name: release-abi
on:
push:
tags: ['v*']
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
steps:
- uses: actions/checkout@v4
- name: 构建
run: make build
- name: 打包 ABI 产物
run: |
set -euo pipefail
v="${GITHUB_REF_NAME}"
d="blockmalloc-abi-$v-linux-x86_64"
# 本库是 header-only(#define BLOCKMALLOC_IMPLEMENTATION 单头文件):
# 只发头,不发 .so —— 消费者把实现体编进自己的 TU。
mkdir -p "$d/include"
cp -R include/. "$d/include/"
printf '{"abi":"%s"}\n' "$v" > "$d/abi-manifest.json"
tar czf "$d.tar.gz" "$d"
tar tzf "$d.tar.gz"
sha256sum "$d.tar.gz" > SHA256SUMS
- name: 发布 release
run: gh release create "${GITHUB_REF_NAME}" blockmalloc-abi-*.tar.gz SHA256SUMS --generate-notes