Skip to content

Commit fe8133f

Browse files
committed
ci(release): publish the newest package first so a missing trust config cannot half-publish
1 parent 3981bec commit fe8133f

1 file changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -164,21 +164,33 @@ jobs:
164164
echo "version=$VERSION" >> $GITHUB_OUTPUT
165165
bun run build
166166
167-
- name: Publish @roxyapi/ui
167+
# ORDER IS LOAD-BEARING: least-proven package FIRST.
168+
#
169+
# npm publishes cannot be rolled back, so a publish that dies halfway leaves
170+
# npm bumped while the repo has no version commit, no tag and no release, and
171+
# the re-run is then rejected for republishing an existing version. The
172+
# preflight above proves each package EXISTS, but it cannot prove a Trusted
173+
# Publisher is configured on it — a package can exist and still reject OIDC.
174+
#
175+
# Publishing the newest package first turns that unverifiable risk into a safe
176+
# failure: if its trust config is missing, the job dies before the established
177+
# packages are touched and nothing is published at all. Whenever a new wrapper
178+
# package is added, move it to the top of this list until it has shipped once.
179+
- name: Publish @roxyapi/ui-vue
168180
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
169181
run: |
170182
npm install -g npm@latest
171-
(cd packages/ui && npm publish --access public --provenance)
183+
(cd packages/ui-vue && npm publish --access public --provenance)
172184
173-
- name: Publish @roxyapi/ui-react
185+
- name: Publish @roxyapi/ui
174186
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
175187
run: |
176-
(cd packages/ui-react && npm publish --access public --provenance)
188+
(cd packages/ui && npm publish --access public --provenance)
177189
178-
- name: Publish @roxyapi/ui-vue
190+
- name: Publish @roxyapi/ui-react
179191
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'
180192
run: |
181-
(cd packages/ui-vue && npm publish --access public --provenance)
193+
(cd packages/ui-react && npm publish --access public --provenance)
182194
183195
- name: Commit, tag, push
184196
if: steps.diff.outputs.changed == 'true' || github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)