Skip to content

Commit f6478ea

Browse files
ryan-williamsclaude
andcommitted
ci: auto-trigger dist build on push to main, use dist branch name
Push to `main` now auto-triggers the build-dist workflow. The `main` branch pushes to `dist` (matching the `pds` convention) instead of `main-dist`; other branches still get `<branch>-dist`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 095af07 commit f6478ea

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build-dist.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Build dist branch
22

33
on:
4+
push:
5+
branches: [main]
46
workflow_dispatch:
57
inputs:
68
source_ref:
@@ -42,7 +44,12 @@ jobs:
4244
SHORT_SHA: ${{ steps.info.outputs.short_sha }}
4345
SOURCE_VERSION: ${{ steps.info.outputs.version }}
4446
run: |
45-
DIST_BRANCH="${SOURCE_REF}-dist"
47+
# `main` pushes to `dist` (matching pds convention); other branches get namespaced
48+
if [ "$SOURCE_REF" = "main" ]; then
49+
DIST_BRANCH="dist"
50+
else
51+
DIST_BRANCH="${SOURCE_REF}-dist"
52+
fi
4653
DIST_VERSION="${SOURCE_VERSION}-dist.${SHORT_SHA}"
4754
4855
# Configure git

0 commit comments

Comments
 (0)