File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change 11on :
2- workflow_call :
2+ workflow_dispatch :
33 pull_request :
44 paths :
55 - action.ts
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ if ! git diff-index --quiet HEAD --; then
77 exit 1
88fi
99
10- if [ " $( git rev-parse --abbrev-ref HEAD) " != main ]; then
10+ if [ " $( git rev-parse --abbrev-ref HEAD) " != v2/ main ]; then
1111 echo " error: requires main branch" >&2
1212 exit 1
1313fi
2020git fetch origin -pft
2121
2222# ensure github tags the right release
23- git push origin main
23+ git push origin v2/ main
2424
2525versions=" $( git tag | grep ' ^v[0-9]\+\.[0-9]\+\.[0-9]\+' ) "
2626v_latest=" $( bunx -- semver --include-prerelease $versions | tail -n1) "
6161fi
6262
6363
64- gh workflow run ci.action.yml --raw-field version= " $v_new "
64+ gh workflow run ci.action.yml --ref v2/main
6565# ^^ infuriatingly does not tell us the ID of the run
6666
6767gum spin --title ' sleeping 5s because GitHub API is slow' -- sleep 5
@@ -74,8 +74,8 @@ if ! gh run watch --exit-status $run_id; then
7474 exit $foo
7575fi
7676
77- ./dist.sh
78- git add .. /dist
77+ ./scripts/ dist.sh
78+ git add ./dist
7979git commit --message v$v_new
8080git tag v$v_new
8181git push origin main v$v_new
@@ -88,6 +88,3 @@ gh release edit \
8888 v$v_new \
8989 --verify-tag \
9090 --draft=false
91-
92- git checkout main
93- git branch -D v$v_new -branch
You can’t perform that action at this time.
0 commit comments