File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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
2324permissions :
2425 contents : write
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
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ import * as standards from "@eser/standards";
3030import * as functions from "@eser/functions" ;
3131import * as shell from "@eser/shell" ;
3232import * as shellExec from "@eser/shell/exec" ;
33- import * as git from "./git.ts" ;
33+
3434import { readVersionFile } from "./versions.ts" ;
3535import { 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 } ;
You can’t perform that action at this time.
0 commit comments