mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-12-08 12:57:54 +00:00
feat: mark release as draft until all artifacts are uploaded (#692)
Previously, the releases were created and then artifacts (if any) were added to them. This broke when GitHub released "immutable" releases, which disallow changes after the release is published. Make it so that releases are always marked as "draft" when being worked on by the action, and unmarked as draft (if desired) once the action is completed. Fixes #653
This commit is contained in:
@@ -49,6 +49,7 @@ describe('github', () => {
|
||||
getReleaseByTag: () => Promise.reject('Not implemented'),
|
||||
createRelease: () => Promise.reject('Not implemented'),
|
||||
updateRelease: () => Promise.reject('Not implemented'),
|
||||
finalizeRelease: () => Promise.reject('Not implemented'),
|
||||
allReleases: async function* () {
|
||||
yield { data: [mockRelease] };
|
||||
},
|
||||
@@ -254,11 +255,12 @@ describe('github', () => {
|
||||
name: 'test',
|
||||
body: 'test',
|
||||
target_commitish: 'main',
|
||||
draft: false,
|
||||
draft: true,
|
||||
prerelease: false,
|
||||
assets: [],
|
||||
},
|
||||
}),
|
||||
finalizeRelease: async () => {},
|
||||
allReleases: async function* () {
|
||||
yield {
|
||||
data: [
|
||||
|
||||
Reference in New Issue
Block a user