Skip to content

Commit 9f6a83e

Browse files
authored
ci: fix release-please output keys; allow tag rebuilds (#44)
* ci: read manifest-prefixed release-please outputs; allow tag rebuilds In manifest mode release-please emits per-package outputs (app--tag_name) plus a top-level releases_created, not the bare release_created/tag_name the build gate read — so v0.2.0 got tagged but the build was skipped. Read the correct keys, and add a workflow_dispatch `tag` input that checks out and builds an existing tag so its assets (bundles + latest.json) can be filled in. * ci: exclude release-please-owned files from oxfmt release-please re-serializes CHANGELOG.md and tauri.conf.json its own way on every release (expanded JSON arrays, double-spaced changelog headers), which oxfmt then flags — failing CI on each release commit. Add both to the fmt/lint ignorePatterns so the two tools stop fighting.
1 parent 2cac5db commit 9f6a83e

2 files changed

Lines changed: 36 additions & 7 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,17 @@ name: Release
33
# release-please watches conventional commits on `main` and maintains a "release PR"
44
# that bumps the version (app/package.json + Cargo.toml + tauri.conf.json) and the
55
# changelog. Merging that PR cuts the GitHub release + tag, and the build job then
6-
# attaches the platform bundles to it. workflow_dispatch runs a build-only smoke test
7-
# (no release). Activates once this branch is merged to main.
6+
# attaches the platform bundles to it. workflow_dispatch with a `tag` rebuilds an
7+
# existing release's assets (recovery / manual fill-in); without one it's a build-
8+
# only smoke test.
89
on:
910
push:
1011
branches: [main]
1112
workflow_dispatch:
13+
inputs:
14+
tag:
15+
description: 'Existing release tag to build + attach assets to (e.g. v0.2.0). Empty = build-only smoke test.'
16+
required: false
1217

1318
permissions:
1419
contents: write
@@ -17,9 +22,11 @@ permissions:
1722
jobs:
1823
release-please:
1924
runs-on: ubuntu-latest
25+
# Manifest mode prefixes per-package outputs with the path: app--tag_name, etc.
26+
# `releases_created` is the top-level "did anything get released this run" flag.
2027
outputs:
21-
release_created: ${{ steps.rp.outputs.release_created }}
22-
tag_name: ${{ steps.rp.outputs.tag_name }}
28+
release_created: ${{ steps.rp.outputs.releases_created }}
29+
tag_name: ${{ steps.rp.outputs['app--tag_name'] }}
2330
steps:
2431
- uses: googleapis/release-please-action@v4
2532
id: rp
@@ -44,7 +51,11 @@ jobs:
4451
bundles: 'nsis'
4552
runs-on: ${{ matrix.platform }}
4653
steps:
54+
# On a manual tag build, check out that tag's code so the bundle's version
55+
# matches the release; otherwise build the pushed commit.
4756
- uses: actions/checkout@v4
57+
with:
58+
ref: ${{ inputs.tag || github.ref }}
4859

4960
# Tauri's webview + bundling deps (Linux only). The Ubuntu runner is Debian-
5061
# based, so unlike an Arch host its linuxdeploy/AppImage tooling works.
@@ -90,5 +101,5 @@ jobs:
90101
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
91102
with:
92103
projectPath: app
93-
tagName: ${{ needs.release-please.outputs.tag_name }}
104+
tagName: ${{ needs.release-please.outputs.tag_name || inputs.tag }}
94105
args: --bundles ${{ matrix.bundles }}

app/vite.config.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,29 @@ function serveIconsDev() {
8787
const config = defineConfig({
8888
// generated/data files: TanStack Router output, sqlite db, icon atlas + manifest.
8989
// `e2e/**` is a standalone Playwright package (own deps + tooling) — not ours.
90+
// `CHANGELOG.md` + `src-tauri/tauri.conf.json` are owned by release-please, which
91+
// re-serializes them its own way each release — don't let oxfmt fight it.
9092
fmt: {
91-
ignorePatterns: ["src/routeTree.gen.ts", "dev.db*", "icon-data/**", "drizzle/**", "e2e/**"],
93+
ignorePatterns: [
94+
"src/routeTree.gen.ts",
95+
"dev.db*",
96+
"icon-data/**",
97+
"drizzle/**",
98+
"e2e/**",
99+
"CHANGELOG.md",
100+
"src-tauri/tauri.conf.json",
101+
],
92102
},
93103
lint: {
94-
ignorePatterns: ["src/routeTree.gen.ts", "dev.db*", "icon-data/**", "drizzle/**", "e2e/**"],
104+
ignorePatterns: [
105+
"src/routeTree.gen.ts",
106+
"dev.db*",
107+
"icon-data/**",
108+
"drizzle/**",
109+
"e2e/**",
110+
"CHANGELOG.md",
111+
"src-tauri/tauri.conf.json",
112+
],
95113
jsPlugins: [{ name: "vite-plus", specifier: "vite-plus/oxlint-plugin" }],
96114
rules: { "vite-plus/prefer-vite-plus-imports": "error" },
97115
options: { typeAware: true, typeCheck: true },

0 commit comments

Comments
 (0)