YosysHQ / oss-cad-suite-build

Multi-platform nightly builds of open source digital design and verification tools
ISC License
774 stars 70 forks source link

Unique link for newest release #53

Closed splinedrive closed 1 year ago

splinedrive commented 1 year ago

Hi,

it would be nice to have an unique link to get the latest tarball for an architecture.

lethalbit commented 1 year ago

The only reliable way to do this at the moment is to use the GitHub API with the releases/latest endpoint for the repository.

What would be use-case for such a link?

splinedrive commented 1 year ago

Easier update, just simple wget or curl to that pointed link!

splinedrive commented 1 year ago

ok! I have got a script from openai.com import requests
import subprocess

url = 'https://api.github.com/repos/YosysHQ/oss-cad-suite-build/releases/latest'

response = requests.get(url)
release = response.json()

assets = [asset for asset in release['assets'] if asset['name'].endswith('.tgz') and 'x64' in asset['name'] and 'linux' in asset['name']]

for asset in assets:
| link = asset['browser_download_url']
| subprocess.run(["wget", link])

~
~

lethalbit commented 1 year ago

If you're going to use this with a GitHub CI Workflow, then I recommend using the setup-oss-cad-suite action as it handles it all for you.

splinedrive commented 1 year ago

If you're going to use this with a GitHub CI Workflow, then I recommend using the setup-oss-cad-suite action as it handles it all for you.

Thanx