Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Workflows update pre-release and draft flags for existing releases #2090

Closed
ianlewis opened this issue May 2, 2023 · 1 comment · Fixed by #2091
Closed

[bug] Workflows update pre-release and draft flags for existing releases #2090

ianlewis opened this issue May 2, 2023 · 1 comment · Fixed by #2091
Assignees
Labels
area:generic Issue with the generic generator area:go Issue related to the Go ecosystem type:bug Something isn't working

Comments

@ianlewis
Copy link
Member

ianlewis commented May 2, 2023

When the release that we upload to already exist the new draft-release and prerelease flags update the existing release when not passed. We need a way to not update the release if those inputs are not passed to the workflows.

@ianlewis ianlewis added type:bug Something isn't working area:go Issue related to the Go ecosystem area:generic Issue with the generic generator labels May 2, 2023
@ianlewis ianlewis added this to the Node.js builder Beta milestone May 2, 2023
@ianlewis ianlewis self-assigned this May 2, 2023
@ianlewis
Copy link
Member Author

ianlewis commented May 2, 2023

The softprops/action-gh-release prerelease and draft flags have somewhat complicated logic. This is partly because it can create new releases or update an existing release.

  • "true": set to prerelease (case-sensitive, new and existing)
  • any other non-empty value: set to regular release (new and existing)
  • "": no change for existing releases, false for new releases

We need to replicate this logic in our workflow. Thankfully we can just change the inputs to strings rather than boolean, have them default to "" and just pass them to the action directly.

ianlewis pushed a commit that referenced this issue May 3, 2023
Fixes #2090

Changes the `prerelease` and `draft-release` flags to strings and passes
them directly to `softprops/action-gh-release` in order to preserve the
logic of that action.

Also updates `upload-tag-name` to pass that value directly to
`softprops/action-gh-release`.

---------

Signed-off-by: Ian Lewis <ianlewis@google.com>
ianlewis pushed a commit that referenced this issue May 9, 2023
#label:release v1.6.0-rc.3

We need to merge several PRs before this one:

- Revert references back to main: #2092 
- Fix for #2090
  - #2091
- #2094 
- #2093
- #2108 
- Optional: #2088
- Optional: #2089

---------

Signed-off-by: Ian Lewis <ianlewis@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:generic Issue with the generic generator area:go Issue related to the Go ecosystem type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant