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

[4.0] on release, upload .deb as release asset automatically #247

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

spoonincode
Copy link
Member

@spoonincode spoonincode commented Nov 6, 2023

Similar to leap's release workflow, I guess we'll just have to merge this and hope it works next time we do a release (and tweak accordingly) since I don't have a good way to clearly demonstrate that it works. I have tested it on a private repo though.

Resolves #243

name: Upload Release .deb
runs-on: ubuntu-latest
permissions:
contents: write
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fairly alarming permission since it does give the workflow permission to make commits in to the repository. But, to upload a release asset we need this.

-H "X-GitHub-Api-Version: 2022-11-28" \
-H "Content-Type: application/octet-stream" \
--data-binary "@${{steps.getter.outputs.downloaded-file}}" \
"https://uploads.github.com/repos/${{github.repository}}/releases/${{github.event.release.id}}/assets?name=${{steps.getter.outputs.downloaded-file}}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found using curl was easiest here instead of an octokit JS job because the JS API requires loading the whole file in memory if I'm understanding it correctly 😕

@spoonincode spoonincode linked an issue Nov 6, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

automatically plumb through .deb file to release assets
3 participants