Skip to content

Commit 18d00a9

Browse files
Boshenclaude
andcommitted
chore: gate pkg.pr.new publish on label only
Drop the workflow_dispatch and ci/pkg-pr-new push triggers so the preview publish only runs when a PR is labeled with pkg.pr.new. Add MAINTENANCE.md documenting the label workflow and how to install a preview build. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 5439608 commit 18d00a9

2 files changed

Lines changed: 16 additions & 13 deletions

File tree

.github/workflows/publish-to-pkg.pr.new.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ name: Publish to pkg.pr.new
55
permissions: {}
66

77
on:
8-
workflow_dispatch:
9-
push:
10-
branches:
11-
- ci/pkg-pr-new
128
pull_request:
139
types: [labeled]
1410

@@ -20,9 +16,7 @@ jobs:
2016
prepare:
2117
if: >-
2218
github.repository == 'voidzero-dev/vite-plus' &&
23-
(github.event_name == 'workflow_dispatch' ||
24-
github.event_name == 'push' ||
25-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')))
19+
contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')
2620
name: Compute snapshot version
2721
runs-on: ubuntu-latest
2822
permissions:
@@ -45,9 +39,7 @@ jobs:
4539
name: Build bindings and binaries
4640
if: >-
4741
github.repository == 'voidzero-dev/vite-plus' &&
48-
(github.event_name == 'workflow_dispatch' ||
49-
github.event_name == 'push' ||
50-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')))
42+
contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')
5143
needs: prepare
5244
permissions:
5345
contents: read
@@ -59,9 +51,7 @@ jobs:
5951
publish:
6052
if: >-
6153
github.repository == 'voidzero-dev/vite-plus' &&
62-
(github.event_name == 'workflow_dispatch' ||
63-
github.event_name == 'push' ||
64-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')))
54+
contains(github.event.pull_request.labels.*.name, 'pkg.pr.new')
6555
name: Pkg Preview
6656
runs-on: ubuntu-latest
6757
needs:

MAINTENANCE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Maintenance
2+
3+
## Publishing Preview Packages
4+
5+
Publish to https://pkg.pr.new/~/voidzero-dev/vite-plus
6+
7+
Add the `pkg.pr.new` label to the PR.
8+
9+
Use the commit sha, e.g.:
10+
11+
```sh
12+
pnpm add https://pkg.pr.new/voidzero-dev/vite-plus@sha
13+
```

0 commit comments

Comments
 (0)