File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 44 workflow_dispatch :
55 inputs :
66 are-you-sure :
7- description : ' Are you sure you want to cut a release? Only "YES!!!" will be accepted'
7+ description : ' Are you sure you want to cut a release? Only "YES!!!" will be accepted'
88 required : true
99 version :
1010 description : ' Version number (leave empty to auto-increment)'
1616 runs-on : ubuntu-latest
1717 permissions :
1818 contents : write # Required for creating tags and branches
19-
2019 steps :
2120 - name : Checkout code
2221 uses : actions/checkout@v5
3029 go-version : ' 1.22'
3130
3231 - name : Create release
32+ working-directory : releaser
3333 env :
3434 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3535 run : |
4545 FLAGS="$FLAGS -version=${{ inputs.version }}"
4646 fi
4747
48- go run make_release.go -repo=. $FLAGS
48+ go run make_release.go -repo=../ $FLAGS
Original file line number Diff line number Diff line change @@ -295,15 +295,20 @@ func (rm *ReleaseManager) DeleteRemoteTag(version string) error {
295295func (rm * ReleaseManager ) CreateGitHubRelease (version string ) error {
296296 ctx := context .Background ()
297297
298+ v , err := semver .NewVersion (version )
299+ if err != nil {
300+ return fmt .Errorf ("failed to parse version for release: %w" , err )
301+ }
302+
298303 release := & github.RepositoryRelease {
299304 TagName : github .String (version ),
300305 TargetCommitish : github .String ("main" ),
301306 Name : github .String (fmt .Sprintf ("Release %s" , version )),
302- Prerelease : github .Bool (false ),
307+ Prerelease : github .Bool (v . Prerelease () != "" ),
303308 GenerateReleaseNotes : github .Bool (true ),
304309 }
305310
306- _ , _ , err : = rm .client .Repositories .CreateRelease (
311+ _ , _ , err = rm .client .Repositories .CreateRelease (
307312 ctx ,
308313 rm .githubOwner ,
309314 rm .githubRepo ,
You can’t perform that action at this time.
0 commit comments