File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed
Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 11name : Release
22
3- on : workflow_dispatch
3+ on :
4+ workflow_dispatch :
5+ inputs :
6+ release_version :
7+ description : Release version
8+ required : false
9+ default : ' '
410
511jobs :
612 pre-release :
2127 run : >-
2228 git config user.name "${{ secrets.GIT_USERNAME }}" &&
2329 git config user.email "${{ secrets.GIT_USER_EMAIL }}"
30+ - name : Release the specified version
31+ if : ${{ github.event.inputs.release_version != '' }}
32+ run : sbt preRelease ${{ github.event.inputs.release_version }}
2433 - name : Release new version
25- run : sbt preRelease
34+ if : ${{ github.event.inputs.release_version == '' }}
35+ run : sbt preRelease ""
2636 - name : Latest tag
2737 uses : actions-ecosystem/action-get-latest-tag@v1
2838 id : latest-tag
Original file line number Diff line number Diff line change @@ -5,3 +5,9 @@ rewrite.scala3.convertToNewSyntax = yes
55rewrite.scala3.insertEndMarkerMinLines = 4
66rewrite.scala3.removeOptionalBraces = oldSyntaxToo
77project.git = true
8+
9+ fileOverride {
10+ "glob:**.sbt" {
11+ runner.dialect = sbt1
12+ }
13+ }
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ scalacOptions ++= Seq(
5757 " -Wunused:all"
5858)
5959
60- commands += Command .command (" preRelease" ) { state =>
60+ commands += Command .single (" preRelease" ) { ( state, nextVersion) =>
6161 val newState = Project
6262 .extract(state)
6363 .appendWithSession(
@@ -77,7 +77,14 @@ commands += Command.command("preRelease") { state =>
7777 state,
7878 )
7979
80- Command .process(" release with-defaults" , newState)
80+ if (nextVersion == " \"\" " )
81+ Command .process(" release with-defaults" , newState)
82+ else
83+ Command .process(
84+ s " release with-defaults release-version $nextVersion" ,
85+ newState,
86+ )
87+
8188}
8289
8390commands += Command .command(" postRelease" ) { state =>
You can’t perform that action at this time.
0 commit comments