-
Notifications
You must be signed in to change notification settings - Fork 7
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
Download stacks-node (instead of building it) #17
Comments
That is definitely a direction I considered, I wrote this script before the builds were setup. I would need to figure out how to grab the most current ones each time. |
This may not be possible without being authenticated against GitHub, which is undesirable from the viewpoint of this script. Some more info from searching the Internets:
Sample code that fails:
edit this may be a possible solution if Blockstack is interested: https://github.com/actions/upload-release-asset |
We should ask for proper releases that contain the assets
Jason Schrader <notifications@github.com> schrieb am Do., 30. Juli 2020,
19:53:
… This may not be possible without being authenticated against GitHub, which
is undesirable from the viewpoint of this script.
Some more info from searching the Internets:
- Releases do not show
<https://api.github.com/repos/blockstack/stacks-blockchain/releases/latest>
assets so cannot use one-liner scripts like this one
<https://gist.github.com/steinwaywhw/a4cd19cda655b8249d908261a62687f8>
- Example of the Artifacts
<https://github.com/blockstack/stacks-blockchain/actions/runs/186057766>
with artifacts being the key word (as part of GitHub Action)
- GitHub documentation on downloading artifacts
<https://docs.github.com/en/rest/reference/actions#download-an-artifact>,
however it does say:
Anyone with read access to the repository can use this endpoint. If the
repository is private you must use an access token with the repo scope.
GitHub Apps must have the actions:read permission to use this endpoint.
Sample code that fails:
curl \
-H "Accept: application/vnd.github.v3+json" \https://api.github.com/repos/blockstack/stacks-blockchain/actions/artifacts/186057766/zip
{
"message": "You must have the actions scope to download artifacts.",
"documentation_url": "https://developer.github.com/v3/actions/artifacts/#download-an-artifact"
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALBYWJ74E3HAEB4YIRMLQ3R6GXR7ANCNFSM4O62FJFA>
.
|
@friedger I agree, just not sure they are ready for it, see stacks-network/stacks-core#1780 If the artifacts could be automatically converted to assets under a release, then it would be much faster to use something pre-compiled for a tool like this shell script, and save us the time of building the code manually. |
Update 20200906 - stacks-network/stacks-core#1821 is now merged that closes the issue linked above and contains two jobs that should create a release with distributables accessible via a (non-authenticated) script. stacks-blockchain.yml#L131: # Create a new release if we're building a tag or a tag was passed in stacks-blockchain.yml#L155: # Upload distributables to a new release if we're building a tag or a tag was passed in However, at this time these two jobs have been skipped by every run since the master branch has not been updated yet, so we don't have a way to test. My guess is that once the new phase is released we will be able to try this out versus manually building everything! 👍 |
Looks like this may officially be possible now! https://github.com/blockstack/stacks-blockchain/releases/tag/v23.0.0.0-krypton UPDATE: close, but not quite there, will require some investigation
results in:
I thought the period. was a nice touch at the end. |
Link to "latest" release will always be: https://github.com/blockstack/stacks-blockchain/releases/latest/download/linux-x64.zip Testing with Testing with same release from Ubuntu Server, turns out Time to implement this in a new version of the script! |
Per GH documentation we can grab the latest release info via the API, which includes some info that might help prevent multiple downloads of the same version. Example:
output: Other notable fields:
Assets are available via the json as well, but each contains an ID and it may be easier to just use the URL listed in the previous comment. For example:
|
First pass, seems to be working!
Per the last comment, storing/comparing Debug could still have an option to build the code from stacks-blockchain via #27 or similar. |
Download could apply to Mac or Linux Windows could use a separate batch script? |
There are regular nightly builds that could be used.
The text was updated successfully, but these errors were encountered: