Skip to content

Commit 683f85d

Browse files
committed
chore(*): updated build pipelines (take II).
1 parent 9a96ae1 commit 683f85d

2 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ on:
1515

1616
workflow_dispatch:
1717
inputs:
18-
run_checks:
19-
description: Run integrity checks
18+
deploy:
19+
description: "Run deployment pipeline (smoke-test → publish → release-notes)"
2020
required: false
2121
type: boolean
22+
default: false
2223

2324
permissions:
2425
contents: write
@@ -75,9 +76,10 @@ jobs:
7576
name: Tag Release
7677
needs: validate
7778
if: >-
78-
github.event_name == 'push' &&
79-
github.ref == 'refs/heads/main' &&
80-
startsWith(github.event.head_commit.message, 'chore(codebase): release v')
79+
(github.event_name == 'push' &&
80+
github.ref == 'refs/heads/main' &&
81+
startsWith(github.event.head_commit.message, 'chore(codebase): release v'))
82+
|| (github.event_name == 'workflow_dispatch' && inputs.deploy == true)
8183
runs-on: ubuntu-latest
8284
permissions:
8385
contents: write

pkg/@eser/codebase/release.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import * as standards from "@eser/standards";
3030
import * as functions from "@eser/functions";
3131
import * as shell from "@eser/shell";
3232
import * as shellExec from "@eser/shell/exec";
33-
import * as git from "./git.ts";
33+
3434
import { readVersionFile } from "./versions.ts";
3535
import { runCliMain, toCliEvent } from "./cli-support.ts";
3636

@@ -311,12 +311,10 @@ export const rerelease = async (
311311
const tag = `v${version}`;
312312

313313
if (!dryRun) {
314-
// Delete existing tag (local + remote)
315-
await gitDeleteTag(tag);
316-
317-
// Recreate tag and push
318-
await git.createTag(tag, `Release ${tag}`);
319-
await git.pushTag("origin", tag);
314+
// Trigger deployment pipeline (handles tag deletion + recreation idempotently)
315+
await shellExec.exec`gh workflow run build.yml -f deploy=true`
316+
.noThrow()
317+
.spawn();
320318
}
321319

322320
return { version, tag, dryRun };

0 commit comments

Comments
 (0)