Skip to content

Add fork-status snapshot to PostHog changes section in README #140

Add fork-status snapshot to PostHog changes section in README

Add fork-status snapshot to PostHog changes section in README #140

#
# This workflow calls the main distribution pipeline from DuckDB to build, test and (optionally) release the extension
#
name: Main Extension Distribution Pipeline
on:
push:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }}
cancel-in-progress: true
jobs:
get-duckdb-version:
name: Get DuckDB version
runs-on: ubuntu-latest
outputs:
duckdb_version: ${{ steps.version.outputs.duckdb_version }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
sparse-checkout: .github
- id: version
run: echo "duckdb_version=$(cat .github/duckdb-version)" >> $GITHUB_OUTPUT
duckdb-next-build:
name: Build extension binaries
needs: get-duckdb-version
# Vendored copy of duckdb/extension-ci-tools _extension_distribution.yml (v1.5.2);
# see .github/workflows/_extension_distribution.yml for source SHA and rationale.
uses: ./.github/workflows/_extension_distribution.yml
with:
duckdb_version: ${{ needs.get-duckdb-version.outputs.duckdb_version }}
ci_tools_version: main
extension_name: ducklake
duckdb-next-deploy:
name: Deploy extension binaries
needs: [get-duckdb-version, duckdb-next-build]
if: github.ref != 'refs/heads/main'
# Vendored copy of duckdb/extension-ci-tools _extension_deploy.yml (v1.5.2);
# see .github/workflows/_extension_deploy.yml for source SHA and rationale.
uses: ./.github/workflows/_extension_deploy.yml
secrets: inherit
with:
extension_name: ducklake
duckdb_version: ${{ needs.get-duckdb-version.outputs.duckdb_version }}
ci_tools_version: main
deploy_latest: ${{ startsWith(github.ref, 'refs/heads/v') }}
deploy_versioned: ${{ startsWith(github.ref, 'refs/heads/v') }}
publish-github-release:
name: Publish GitHub Release assets
runs-on: ubuntu-latest
needs: [get-duckdb-version, duckdb-next-build]
if: startsWith(github.ref, 'refs/tags/')
permissions:
contents: write
actions: read
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
RELEASE_TAG: ${{ github.ref_name }}
DUCKDB_VERSION: ${{ needs.get-duckdb-version.outputs.duckdb_version }}
steps:
- name: Download linux amd64 extension
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ducklake-${{ env.DUCKDB_VERSION }}-extension-linux_amd64
path: release-assets/linux_amd64
- name: Download linux arm64 extension
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: ducklake-${{ env.DUCKDB_VERSION }}-extension-linux_arm64
path: release-assets/linux_arm64
- name: Stage release assets
run: |
mkdir -p release-assets/staged
cp release-assets/linux_amd64/ducklake.duckdb_extension release-assets/staged/ducklake-linux-amd64.duckdb_extension
cp release-assets/linux_arm64/ducklake.duckdb_extension release-assets/staged/ducklake-linux-arm64.duckdb_extension
cd release-assets/staged
sha256sum ducklake-linux-amd64.duckdb_extension ducklake-linux-arm64.duckdb_extension > SHA256SUMS
- name: Create or update GitHub Release
run: |
if ! gh release view "$RELEASE_TAG" >/dev/null 2>&1; then
gh release create "$RELEASE_TAG" \
--target "$GITHUB_SHA" \
--title "$RELEASE_TAG" \
--notes "PostHog DuckLake extension binaries for DuckDB ${DUCKDB_VERSION}."
fi
gh release upload "$RELEASE_TAG" \
release-assets/staged/ducklake-linux-amd64.duckdb_extension \
release-assets/staged/ducklake-linux-arm64.duckdb_extension \
release-assets/staged/SHA256SUMS \
--clobber