Open probonopd opened 11 months ago
I suppose that there's Github's "boo is not bool"-problem. Try to use strings like 'false'
or if you really need bool
- pass empty string ""
or ${{ null }}
, so it casts to boolean as false
.
Thanks @boozook. Is this a change @softprops would need to make in this action, or should it work if I simply set draft: ${{ null }}
instead of draft: false
?
@probonopd, looking at that line I suppose the value is interpreting as following:
true
if value == "true"
(string)false
(actually undefined
, sic!) for any other value.Also there input is defined as empty by default.
So in this case for false
I could try ${{ null }}
or empty string as by default.
Anyway, it's just my suppose, I'm not sure and I'm not a guru of this language.
FYI: As I remember "false"
casts to bool
as true
because in bytes this isn't empty or zero.
For example "0" == false
=> true
.
I've had the same issue. I am using the same workflow (remove tag + release, then release again).
draft
is false by default, so there is no need to explicitly specify it.
I've fixed this issue by putting sleep between deletion and release steps. (In your example on this line: https://github.com/probonopd/attrutil/blob/a87a383bcd9061fee192208572de9fae3a141e8b/.github/workflows/build.yml#L37)
Very simple code:
- name: Wait a sec
run: sleep 2
Sleep variable should be tweaked
The reasoning for sleep is, that GH API is slower then action script, so by the time CI is releasing, deletion is still queued on gh side. But that is just a silly theory of mine.
Still doesn't seem to work:
I'm also using delete-tag-and-release
action instead of git command to remove previous releases.
Or/and increase wait time, 2s delay is working for me, that doesn't mean it's the rule.
I am using this:
https://github.com/probonopd/attrutil/blob/main/.github/workflows/build.yml
I was hoping that thanks to
draft: false
, the releases would not be created as drafts, but they are.