Skip to content

Commit e72cd3b

Browse files
committed
build(release): v4 is a branch now, and the tag that pretended to be one is gone
A ref that moves should look like one. `v4` was a tag this repository force-pushed onto every release, so `dAppCore/build@v4` meant different code from one afternoon to the next while looking pinned — which is how lthn/desktop asked for darwin:package, got it, and then got darwin:build from the same unchanged line. It is a branch at the same name, so @v4 still resolves and now says what it does. Version tags stay exactly as they are: cut once, never moved. Consumers pin those. The manifests reach each other at @v4 so consuming the branch runs the whole tree rather than a new root over frozen sub-actions, and that is what our own repositories use — better it breaks for us. v4-branch.yml fast-forwards the branch from main, and refuses if the two have diverged rather than discarding anything. scripts/release.sh cuts a tag on a detached commit with the internal references rewritten to that version, leaving the branch alone. Co-Authored-By: Virgil <virgil@lethean.io>
1 parent 9dae8c9 commit e72cd3b

32 files changed

Lines changed: 150 additions & 90 deletions

File tree

.github/workflows/v4-branch.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: v4 branch
2+
3+
# The manifests reach for each other at @v4, so that branch is what every job
4+
# using dAppCore/build@v4 actually runs — including this repository's own CI.
5+
# If it lagged main, a change would test green against the previous tree and the
6+
# sub-action edit in the same commit would simply not be there.
7+
#
8+
# A fast-forward, never a force. If v4 has somehow diverged from main this fails
9+
# and says so, rather than discarding whatever is on it.
10+
#
11+
# This moves a branch, which is what branches do. Release tags are cut by
12+
# scripts/release.sh and never moved by anything.
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
workflow_dispatch:
18+
19+
permissions:
20+
contents: write
21+
22+
concurrency:
23+
group: v4-branch
24+
cancel-in-progress: false
25+
26+
jobs:
27+
sync:
28+
name: fast-forward v4 to main
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
with:
33+
fetch-depth: 0
34+
35+
- name: Fast-forward
36+
shell: bash
37+
run: |
38+
set -euo pipefail
39+
MAIN="$(git rev-parse origin/main)"
40+
41+
if git rev-parse -q --verify origin/v4 >/dev/null; then
42+
CURRENT="$(git rev-parse origin/v4)"
43+
if [ "$CURRENT" = "$MAIN" ]; then
44+
echo "[DEBUG_LOG] v4 already at $MAIN"
45+
exit 0
46+
fi
47+
if ! git merge-base --is-ancestor "$CURRENT" "$MAIN"; then
48+
echo "::error::v4 is at $CURRENT, which is not an ancestor of main — fast-forwarding would discard it"
49+
exit 1
50+
fi
51+
fi
52+
53+
git push origin "$MAIN:refs/heads/v4"
54+
echo "[DEBUG_LOG] v4 -> $MAIN"

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,25 @@ a workflow artifact, and publishes a GitHub release when the ref is a tag.
1818
1919
## Versions
2020
21-
Pin an exact release. There is no `@v4` that follows the newest v4 — a tag here
22-
points at one commit and is never moved onto another, so the build you tested is
23-
the build you keep getting. Upgrading is a line in your workflow, chosen by you.
21+
Pin an exact release: `@v4.16.0`. A tag here points at one commit and is never
22+
moved onto another, so the build you tested is the build you keep getting.
23+
Upgrading is a line in your workflow, chosen by you.
2424

25-
`@main` is the development branch, and it is what dAppCore's own repositories
26-
use. Its manifests reach for each other at `@main` too, so consuming it exercises
27-
the whole tree rather than a new root over frozen sub-actions. It moves without
28-
warning and it is meant to — better that it breaks for us first.
25+
`@v4` is a branch — the major line's development head, and what dAppCore's own
26+
repositories use. Its manifests reach for each other at `@v4` too, so consuming
27+
it exercises the whole tree rather than a new root over frozen sub-actions. It
28+
moves without warning and it is meant to — better that it breaks for us first.
29+
30+
It was a tag once, moved onto each release by CI. A ref that moves should look
31+
like one, so it is a branch now and `@v4` still resolves.
2932

3033
## Contents
3134

3235
| | |
3336
| :-- | :-- |
3437
| [Quickstart](https://dappco.re/build/quickstart/) | The matrix build, build-only, and apps not at the repository root |
3538
| [How detection works](https://dappco.re/build/detection/) | What it reads, what it concludes, how to overrule it |
36-
| [Wails v3](https://dappco.re/build/stacks/wails3/) | Runs your Taskfile target — so CI takes the path you do |
39+
| [Wails v3](https://dappco.re/build/stacks/wails3/) | Runs `wails3 build` or `wails3 package` — so CI takes the path you do |
3740
| [Wails v2](https://dappco.re/build/stacks/wails2/) | Composes `wails build` flags from inputs |
3841
| [Go binaries](https://dappco.re/build/stacks/go/) | A module, a main package, a binary |
3942
| [C++](https://dappco.re/build/stacks/cpp/) | Conan 2 resolves, CMake builds |

action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,13 @@ runs:
123123
steps:
124124
- name: Discovery
125125
id: discovery
126-
uses: dAppCore/build/actions/discovery@main
126+
uses: dAppCore/build/actions/discovery@v4
127127
with:
128128
working-directory: ${{ inputs.app-working-directory }}
129129

130130
- name: Delegate to directory orchestrator
131131
id: dir_orch
132-
uses: dAppCore/build/actions@main
132+
uses: dAppCore/build/actions@v4
133133
with:
134134
build: ${{ inputs.build }}
135135
sign: ${{ inputs.sign }}

actions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Stacks under actions/build/
2121
Notes
2222
- In composite actions (inside this repo), reference other sub-actions via relative paths like `uses: ./actions/discovery`.
2323
- In workflows within this repo, reference local actions with `uses: ./actions/<name>` (or the repo root with `uses: ./`).
24-
- For consumers of this repo, use the fully qualified path, for example: `uses: dAppCore/build/actions/discovery@main`.
24+
- For consumers of this repo, use the fully qualified path, for example: `uses: dAppCore/build/actions/discovery@v4`.

actions/action.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ runs:
151151
- name: Call Wails v2 wrapper
152152
id: w2
153153
if: steps.sel.outputs.SELECTED_STACK == 'wails2'
154-
uses: dAppCore/build/actions/build/wails2@main
154+
uses: dAppCore/build/actions/build/wails2@v4
155155
with:
156156
build: ${{ inputs.build }}
157157
sign: ${{ inputs.sign }}
@@ -168,7 +168,7 @@ runs:
168168
- name: Call Wails v3 wrapper
169169
id: w3
170170
if: steps.sel.outputs.SELECTED_STACK == 'wails3'
171-
uses: dAppCore/build/actions/build/wails3@main
171+
uses: dAppCore/build/actions/build/wails3@v4
172172
with:
173173
build: ${{ inputs.build }}
174174
sign: ${{ inputs.sign }}
@@ -185,7 +185,7 @@ runs:
185185
- name: Call Go wrapper
186186
id: go
187187
if: steps.sel.outputs.SELECTED_STACK == 'go'
188-
uses: dAppCore/build/actions/build/go@main
188+
uses: dAppCore/build/actions/build/go@v4
189189
with:
190190
build: ${{ inputs.build }}
191191
sign: ${{ inputs.sign }}
@@ -214,7 +214,7 @@ runs:
214214
- name: Call C++ wrapper
215215
id: cpp
216216
if: steps.sel.outputs.SELECTED_STACK == 'cpp'
217-
uses: dAppCore/build/actions/build/cpp@main
217+
uses: dAppCore/build/actions/build/cpp@v4
218218
with:
219219
build: ${{ inputs.build }}
220220
sign: ${{ inputs.sign }}
@@ -232,7 +232,7 @@ runs:
232232
- name: Call Node wrapper
233233
id: node
234234
if: steps.sel.outputs.SELECTED_STACK == 'node'
235-
uses: dAppCore/build/actions/build/node@main
235+
uses: dAppCore/build/actions/build/node@v4
236236
with:
237237
build: ${{ inputs.build }}
238238
package: ${{ inputs.package }}
@@ -243,7 +243,7 @@ runs:
243243
- name: Call Bun wrapper
244244
id: bun
245245
if: steps.sel.outputs.SELECTED_STACK == 'bun'
246-
uses: dAppCore/build/actions/build/bun@main
246+
uses: dAppCore/build/actions/build/bun@v4
247247
with:
248248
build: ${{ inputs.build }}
249249
package: ${{ inputs.package }}
@@ -254,7 +254,7 @@ runs:
254254
- name: Call Deno wrapper
255255
id: deno
256256
if: steps.sel.outputs.SELECTED_STACK == 'deno'
257-
uses: dAppCore/build/actions/build/deno@main
257+
uses: dAppCore/build/actions/build/deno@v4
258258
with:
259259
build: ${{ inputs.build }}
260260
sign: ${{ inputs.sign }}
@@ -275,7 +275,7 @@ runs:
275275
- name: Call Core Go wrapper
276276
id: core
277277
if: steps.sel.outputs.SELECTED_STACK == 'core'
278-
uses: dAppCore/build/actions/build/core@main
278+
uses: dAppCore/build/actions/build/core@v4
279279
with:
280280
app-working-directory: ${{ inputs.app-working-directory }}
281281
go-directory: ${{ inputs.go-directory }}

actions/build/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Usage examples
1919
```
2020
- From another repo:
2121
```yaml
22-
- uses: dAppCore/build/actions/build/wails2@main
22+
- uses: dAppCore/build/actions/build/wails2@v4
2323
with:
2424
build-name: myApp
2525
build-platform: linux/amd64

actions/build/bun/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ runs:
6565
steps:
6666
- name: Discovery
6767
id: discovery
68-
uses: dAppCore/build/actions/discovery@main
68+
uses: dAppCore/build/actions/discovery@v4
6969
with:
7070
working-directory: ${{ inputs.app-working-directory }}
7171

@@ -76,7 +76,7 @@ runs:
7676

7777
- name: Build
7878
id: build
79-
uses: dAppCore/build/actions/build/bun/build@main
79+
uses: dAppCore/build/actions/build/bun/build@v4
8080
with:
8181
build: ${{ inputs.build }}
8282
app-working-directory: ${{ inputs.app-working-directory }}
@@ -86,7 +86,7 @@ runs:
8686
install: ${{ inputs.install }}
8787

8888
- name: Package & release
89-
uses: dAppCore/build/actions/package@main
89+
uses: dAppCore/build/actions/package@v4
9090
with:
9191
package: ${{ inputs.package }}
9292
build-name: ${{ inputs.build-name }}

actions/build/cpp/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ runs:
6161
steps:
6262
- name: Discovery
6363
id: discovery
64-
uses: dAppCore/build/actions/discovery@main
64+
uses: dAppCore/build/actions/discovery@v4
6565
with:
6666
working-directory: ${{ inputs.app-working-directory }}
6767

6868
- name: Setup Conan
69-
uses: dAppCore/build/actions/setup/conan@main
69+
uses: dAppCore/build/actions/setup/conan@v4
7070
with:
7171
version: ${{ inputs.conan-version }}
7272

7373
- name: Build
7474
id: build
75-
uses: dAppCore/build/actions/build/cpp/build@main
75+
uses: dAppCore/build/actions/build/cpp/build@v4
7676
with:
7777
build: ${{ inputs.build }}
7878
app-working-directory: ${{ inputs.app-working-directory }}
@@ -82,14 +82,14 @@ runs:
8282
test: ${{ inputs.test }}
8383

8484
- name: Sign artifacts (OS-conditional)
85-
uses: dAppCore/build/actions/sign@main
85+
uses: dAppCore/build/actions/sign@v4
8686
with:
8787
sign: ${{ inputs.sign }}
8888
app-working-directory: ${{ inputs.app-working-directory }}
8989
build-name: ${{ inputs.build-name }}
9090

9191
- name: Package & release
92-
uses: dAppCore/build/actions/package@main
92+
uses: dAppCore/build/actions/package@v4
9393
with:
9494
package: ${{ inputs.package }}
9595
build-name: ${{ inputs.build-name }}

actions/build/deno/action.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ runs:
8484
steps:
8585
- name: Discovery
8686
id: discovery
87-
uses: dAppCore/build/actions/discovery@main
87+
uses: dAppCore/build/actions/discovery@v4
8888
with:
8989
working-directory: ${{ inputs.app-working-directory }}
9090

@@ -116,7 +116,7 @@ runs:
116116
- name: Danet
117117
id: danet
118118
if: steps.fw.outputs.FRAMEWORK == 'danet'
119-
uses: dAppCore/build/actions/build/deno/framework/danet@main
119+
uses: dAppCore/build/actions/build/deno/framework/danet@v4
120120
with:
121121
build: ${{ inputs.build }}
122122
app-working-directory: ${{ inputs.app-working-directory }}
@@ -131,7 +131,7 @@ runs:
131131
- name: Plain build
132132
id: plain
133133
if: steps.fw.outputs.FRAMEWORK == 'none'
134-
uses: dAppCore/build/actions/build/deno/build@main
134+
uses: dAppCore/build/actions/build/deno/build@v4
135135
with:
136136
build: ${{ inputs.build }}
137137
app-working-directory: ${{ inputs.app-working-directory }}
@@ -142,14 +142,14 @@ runs:
142142
output-directory: ${{ inputs.output-directory }}
143143

144144
- name: Sign artifacts (OS-conditional)
145-
uses: dAppCore/build/actions/sign@main
145+
uses: dAppCore/build/actions/sign@v4
146146
with:
147147
sign: ${{ inputs.sign }}
148148
app-working-directory: ${{ inputs.app-working-directory }}
149149
build-name: ${{ inputs.build-name }}
150150

151151
- name: Package & release
152-
uses: dAppCore/build/actions/package@main
152+
uses: dAppCore/build/actions/package@v4
153153
with:
154154
package: ${{ inputs.package }}
155155
build-name: ${{ inputs.build-name }}

actions/build/deno/framework/danet/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ runs:
4444
steps:
4545
- name: Compile
4646
id: build
47-
uses: dAppCore/build/actions/build/deno/build@main
47+
uses: dAppCore/build/actions/build/deno/build@v4
4848
with:
4949
build: ${{ inputs.build }}
5050
app-working-directory: ${{ inputs.app-working-directory }}

0 commit comments

Comments
 (0)