R2Northstar / Northstar

Repo for packaged Northstar releases
https://northstar.tf/
MIT License
1.69k stars 129 forks source link

Add step to create release draft and upload zip #432

Closed GeckoEidechse closed 1 year ago

GeckoEidechse commented 1 year ago

Uses https://github.com/softprops/action-gh-release to create a draft release and upload the Northstar release zip to it.

I adapted the example found here for Northstar.

Not tested cause not sure how I'd do it with act without modifying releases on this repo...

GeckoEidechse commented 1 year ago

Also doesn't skip release candidates cause I don't know to adapt the if to ignore version numbers with the -rcX suffix ^^"

pg9182 commented 1 year ago

Not tested cause not sure how I'd do it with act without modifying releases on this repo...

I generally work on a separate testing repo for trying out workflows.

don't know to adapt the if to ignore version numbers with the -rcX suffix

Something like startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc') should be a good-enough approximation; you'd need to define a custom step with github-script or something similar if you want it more granular.

GeckoEidechse commented 1 year ago

don't know to adapt the if to ignore version numbers with the -rcX suffix

Something like startsWith(github.ref, 'refs/tags/') && !contains(github.ref, '-rc') should be a good-enough approximation; you'd need to define a custom step with github-script or something similar if you want it more granular.

Added that in 34eb359b12894d7215a8a0e6d357bc7a71af1c79 and seems to work.

Not tested cause not sure how I'd do it with act without modifying releases on this repo...

I generally work on a separate testing repo for trying out workflows.

Forked into https://github.com/GeckoEidechse/Northstar and did some testing. Found 2 more issues (missing perms and uploading zips) and resolved them now in 6d90f5f61e8b00553939c5014d5fd89e5a7d420c

For a successful run, see https://github.com/GeckoEidechse/Northstar/actions/runs/4344931842

Note that Thunderstore job failing is expected on the fork as it's missing the auth key to publish to Thunderstore. As there were no changes to that job I don't think it's necessary to test it ^^