-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (53 loc) · 2.09 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (53 loc) · 2.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.25"
# web/dist is committed AND go:embed-ed, so the binary ships whatever
# bundle happens to be in the tree. Nothing used to rebuild it, which
# meant a change to @tinysystems/editor silently did not reach users
# until someone remembered to rebuild and commit the bundle by hand.
#
# Rebuild it here so the release always embeds the editor the lockfile
# pins. --frozen-lockfile keeps this deterministic: picking up a newer
# editor is an explicit `pnpm update @tinysystems/editor` + committed
# lockfile, not a surprise that varies per release run.
# Pinned, not "10". Newer 10.x releases tightened how git-hosted deps are
# matched in the onlyBuiltDependencies allowlist: they want the full
# "name@https://codeload.github.com/.../<sha>" spec, which embeds a commit
# SHA and would therefore have to be edited every time the editor moves.
# 10.27.0 matches on the package name, which is what web/pnpm-workspace.yaml
# declares and what a cold-store install was verified against locally.
- uses: pnpm/action-setup@v4
with:
version: 10.27.0
- uses: actions/setup-node@v4
with:
node-version: "22"
- name: Rebuild embedded editor SPA
working-directory: web
run: |
pnpm install --frozen-lockfile
pnpm run build
- uses: goreleaser/goreleaser-action@v6
with:
version: "~> v2"
args: release --clean
env:
# Default token publishes the GitHub release + assets.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# PAT with write access to tiny-systems/homebrew-tap so the
# formula can be pushed there. Add it as a repo secret.
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}