@biffo/cli 0.271.0 → 0.272.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -23,10 +23,17 @@
23
23
  # ## It needs a token
24
24
  #
25
25
  # The registry is a different repo, so the job-scoped GITHUB_TOKEN cannot write
26
- # to it. Until `REGISTRY_PUBLISH_TOKEN` is set on this repository the job warns
27
- # and skips — deliberately not a failure, so a missing token never reds an
28
- # otherwise good merge, but deliberately not silent either, because silence is
29
- # how the registry went stale in the first place.
26
+ # to it. Until `REGISTRY_PUBLISH_TOKEN` is set on this repository the publish
27
+ # job is **skipped** — deliberately not a failure, so a missing token never
28
+ # reds an otherwise good merge, but deliberately not silent either, because
29
+ # silence is how the registry went stale in the first place: a `::warning`
30
+ # still fires, and the job's own conclusion now reads `skipped` rather than
31
+ # `success`, so a publish that happened and a publish that could not are
32
+ # distinguishable on the PR page, in `branch-health` and in the daily
33
+ # dashboard (biffo-template#1450). A missing token used to read as an
34
+ # ordinary green run — indistinguishable from a real publish everywhere that
35
+ # matters — until the marketing plugin's first merge shipped nothing and
36
+ # nobody could tell without checking the registry by hand.
30
37
  #
31
38
  # Create a fine-grained PAT with `contents: write` on the registry repo, then:
32
39
  # gh secret set REGISTRY_PUBLISH_TOKEN
@@ -36,6 +43,17 @@
36
43
  # `sources.json` from the source manifest, with no credential anywhere. Add your
37
44
  # plugin there and the store converges within a week of any version bump. The
38
45
  # token only upgrades that from eventually-correct to immediately-correct.
46
+ #
47
+ # ## Why this is two jobs
48
+ #
49
+ # The `secrets` context is not available in a job-level `if:`, so the `publish`
50
+ # job cannot be gated on `REGISTRY_PUBLISH_TOKEN` directly — only a step-level
51
+ # `if:` can read `secrets`. `check-token` is a tiny job that always runs, reads
52
+ # the secret in a step, and exposes a boolean job **output** (`needs`/`vars`/
53
+ # `github` contexts, unlike `secrets`, ARE available at job level). `publish`
54
+ # then gates on `needs.check-token.outputs.present` at the job level. GitHub
55
+ # reports a job whose `if:` evaluates false as `skipped`, not `success` — the
56
+ # whole reason for the split.
39
57
  name: Publish to plugin registry
40
58
 
41
59
  on:
@@ -46,29 +64,36 @@ on:
46
64
  workflow_dispatch:
47
65
 
48
66
  jobs:
49
- publish:
50
- name: Upsert registry entry
67
+ check-token:
68
+ name: Check for the registry token
51
69
  runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-latest' }}
70
+ outputs:
71
+ present: ${{ steps.token.outputs.present }}
52
72
  steps:
53
- - name: Check out this plugin
54
- uses: actions/checkout@v4
55
- with:
56
- path: plugin
57
-
58
73
  - name: Check for the registry token
59
74
  id: token
60
75
  env:
61
76
  REGISTRY_PUBLISH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
62
77
  run: |
63
78
  if [ -z "${REGISTRY_PUBLISH_TOKEN}" ]; then
64
- echo "::warning title=Registry not updated::REGISTRY_PUBLISH_TOKEN is not set on this repository, so this plugin's entry in the Biffo plugin registry was NOT updated. The portal marketplace will keep showing the previously published version. See this workflow's header comment."
79
+ echo "::warning title=Registry not updated::REGISTRY_PUBLISH_TOKEN is not set on this repository, so this plugin's entry in the Biffo plugin registry will NOT be updated (the 'Upsert registry entry' job below is skipped). The portal marketplace will keep showing the previously published version. See this workflow's header comment."
65
80
  echo "present=false" >> "$GITHUB_OUTPUT"
66
81
  else
67
82
  echo "present=true" >> "$GITHUB_OUTPUT"
68
83
  fi
69
84
 
85
+ publish:
86
+ name: Upsert registry entry
87
+ needs: check-token
88
+ if: needs.check-token.outputs.present == 'true'
89
+ runs-on: ${{ vars.RUNNER_LABEL || 'ubuntu-latest' }}
90
+ steps:
91
+ - name: Check out this plugin
92
+ uses: actions/checkout@v4
93
+ with:
94
+ path: plugin
95
+
70
96
  - name: Check out the registry
71
- if: steps.token.outputs.present == 'true'
72
97
  uses: actions/checkout@v4
73
98
  with:
74
99
  repository: keiranholloway/biffo-plugins-registry
@@ -82,13 +107,11 @@ jobs:
82
107
  # installs the interpreter itself, which is how this repo's own ci.yml
83
108
  # gets 3.13 on the same runners.
84
109
  - name: Set up Python
85
- if: steps.token.outputs.present == 'true'
86
110
  uses: astral-sh/setup-uv@v6
87
111
  with:
88
112
  python-version: '3.13'
89
113
 
90
114
  - name: Upsert this plugin's entry
91
- if: steps.token.outputs.present == 'true'
92
115
  working-directory: registry
93
116
  run: |
94
117
  set -euo pipefail
@@ -97,7 +120,6 @@ jobs:
97
120
  --repo "${{ github.server_url }}/${{ github.repository }}"
98
121
 
99
122
  - name: Commit and push
100
- if: steps.token.outputs.present == 'true'
101
123
  working-directory: registry
102
124
  run: |
103
125
  set -euo pipefail
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.271.0",
3
+ "version": "0.272.1",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",