{"id":21307013,"url":"https://github.com/perlalien/alien-build-plugin-download-github","last_synced_at":"2025-07-11T21:32:06.824Z","repository":{"id":39580769,"uuid":"180218012","full_name":"PerlAlien/Alien-Build-Plugin-Download-GitHub","owner":"PerlAlien","description":"Alien::Build plugin to download from GitHub","archived":false,"fork":false,"pushed_at":"2024-12-23T12:29:40.000Z","size":77,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-06T09:24:46.839Z","etag":null,"topics":["alien","alien-plugin","perl"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PerlAlien.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-04-08T19:23:37.000Z","updated_at":"2024-12-23T12:29:43.000Z","dependencies_parsed_at":"2022-09-16T13:46:12.362Z","dependency_job_id":null,"html_url":"https://github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/PerlAlien/Alien-Build-Plugin-Download-GitHub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Build-Plugin-Download-GitHub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Build-Plugin-Download-GitHub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Build-Plugin-Download-GitHub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Build-Plugin-Download-GitHub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PerlAlien","download_url":"https://codeload.github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PerlAlien%2FAlien-Build-Plugin-Download-GitHub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264902606,"owners_count":23681094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alien","alien-plugin","perl"],"created_at":"2024-11-21T16:29:25.256Z","updated_at":"2025-07-11T21:32:06.544Z","avatar_url":"https://github.com/PerlAlien.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alien::Build::Plugin::Download::GitHub ![linux](https://github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub/workflows/linux/badge.svg) ![macos](https://github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub/workflows/macos/badge.svg) ![windows](https://github.com/PerlAlien/Alien-Build-Plugin-Download-GitHub/workflows/windows/badge.svg)\n\nAlien::Build plugin to download from GitHub\n\n# SYNOPSIS\n\n```perl\nuse alienfile;\n\n...\n\nshare {\n\n  plugin 'Download::GitHub' =\u003e (\n    github_user =\u003e 'PerlAlien',\n    github_repo =\u003e 'dontpanic',\n  );\n\n};\n```\n\n# DESCRIPTION\n\nThis plugin will download releases from GitHub.  It is generally preferred over\n[Alien::Build::Plugin::Download::Git](https://metacpan.org/pod/Alien::Build::Plugin::Download::Git) for packages that are released on GitHub,\nas it has much fewer dependencies and is more reliable.\n\n# PROPERTIES\n\n## github\\_user\n\nThe GitHub user or org that owns the repository.  This property is required.\n\n## github\\_repo\n\nThe GitHub repository name.  This property is required.\n\n## include\\_assets\n\n\\[deprecated: use the asset\\* properties instead\\]\n\nDefaulting to false, this option designates whether to include the assets of\nreleases in the list of candidates for download. This should be one of three\ntypes of values:\n\n- true value\n\n    The full list of assets will be included in the list of candidates.\n\n- false value\n\n    No assets will be included in the list of candidates.\n\n- regular expression\n\n    If a regular expression is provided, this will include assets that match by\n    name.\n\n## tags\\_only\n\nBoolean value for those repositories that do not upgrade their tags to releases.\nThere are two different endpoints. One for\n[releases](https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository)\nand one for simple [tags](https://developer.github.com/v3/repos/#list-tags). The\ndefault is to interrogate the former for downloads. Passing a true value for\n[\"tags\\_only\"](#tags_only) interrogates the latter for downloads.\n\n## version\n\nRegular expression that can be used to extract a version from a GitHub tag.  The\ndefault ( `qr/^v?(.*)$/` ) is reasonable for many GitHub repositories.\n\n## prefer\n\nHow to sort candidates for selection.  This should be one of three types of values:\n\n- code reference\n\n    This will be used as the prefer hook.\n\n- true value (not code reference)\n\n    Use [Alien::Build::Plugin::Prefer::SortVersions](https://metacpan.org/pod/Alien::Build::Plugin::Prefer::SortVersions).\n\n- false value\n\n    Don't set any preference at all.  The order returned from GitHub will be used if\n    no other prefer plugins are specified.  This may be reasonable for at least some\n    GitHub repositories.  This is the default.\n\n## asset\n\nDownload from assets instead of via tag.  This option is incompatible with\n`tags_only`.\n\n## asset\\_name\n\nRegular expression which the asset name should match.  The default is `qr/\\.tar\\.gz$/`.\n\n## asset\\_format\n\nThe format of the asset.  This is passed to [Alien::Build::Plugin::Extract::Negotiate](https://metacpan.org/pod/Alien::Build::Plugin::Extract::Negotiate)\nso any format supported by that is valid.\n\n\\[version 0.10\\]\n\nIf this is set to `none` then no extractor will be added.  This allows for you to write\nyour own extractor code, or use a non-standard one.\n\n## asset\\_convert\\_version\n\nThis is an optional code reference which can be used to modify the version.  For example,\nif the release version is prefixed with a `v` You could do this:\n\n```perl\nplugin 'Download::GitHub' =\u003e (\n  github_user =\u003e 'PerlAlien',\n  github_repo =\u003e 'dontpanic',\n  asset =\u003e 1,\n  asset_convert_version =\u003e sub {\n    my $version = shift;\n    $version =~ s/^v//;\n    $version;\n  },\n);\n```\n\n# ENVIRONMENT\n\n- ALIEN\\_BUILD\\_GITHUB\\_TOKEN GITHUB\\_TOKEN GITHUB\\_PAT\n\n    If one of these environment variables are set, then the GitHub API Personal\n    Access Token (PAT) will be used when connecting to the GitHub API.\n\n    For security reasons, the PAT will be removed from the log.  Some Fetch plugins\n    (for example the `curl` plugin) will log HTTP requests headers so this will\n    make sure that your PAT is not displayed in the log.\n\n- ALIEN\\_BUILD\\_PLUGIN\\_DOWNLOAD\\_GITHUB\\_DEBUG\n\n    Setting this to a true value will send additional diagnostics to the log during\n    the indexing phase of the fetch.\n\n# CAVEATS\n\nThis plugin does not support, and will not work if `ALIEN_DOWNLOAD_RULE` is set to\neither `digest_and_encrypt` or `digest`.\n\nThe GitHub API is rate limited.  Once you've reach that limit, this plugin will be \ninoperative for a period of time until the limits reset.  When using the GitHub\nAPI unauthenticated the limit is especially low.  This is usually not a problem when\nused in production where you only need to use the API once for each [Alien](https://metacpan.org/pod/Alien), but\nit can become a problem when testing an [Alien](https://metacpan.org/pod/Alien) that uses this plugin in CI or via\ncpantesters.  In this situation you can set the `ALIEN_BUILD_GITHUB_TOKEN` environment\nvariable (or commonly used but unofficial `GITHUB_TOKEN` or `GITHUB_PAT`), and this\nplugin will use that in making API requests.  If you are using GitHub Actions for CI,\nthen you can use the `secrets.GITHUB_TOKEN` macro to get a PAT.\n\nIf you do this it is recommended that you make some precautions where possible:\n\n- Limit permissions\n\n    Create a PAT with the bare minimum access permissions.  Consider creating a\n    separate GitHub account without access to anything, and use it to generate the PAT.\n\n- Limit scope of usage\n\n    The PAT is only needed (if it is needed at all) during the build stage\n    of a share install.  If you are doing this in GitHub Actions you can\n    just set the environment variable for that stage:\n\n    ```\n    perl Makefile.PL\n    env ALIEN_BUILD_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} make\n    make test\n    ```\n\n    Or if you are using [Dist::Zilla](https://metacpan.org/pod/Dist::Zilla)\n\n    ```\n    dzil listdeps --missing | cpanm -n\n    env ALIEN_BUILD_GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} dzil test\n    ```\n\n# AUTHOR\n\nAuthor: Graham Ollis \u003cplicease@cpan.org\u003e\n\nContributors:\n\nRoy Storey (KIWIROY)\n\n# COPYRIGHT AND LICENSE\n\nThis software is copyright (c) 2019-2022 by Graham Ollis.\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-build-plugin-download-github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperlalien%2Falien-build-plugin-download-github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperlalien%2Falien-build-plugin-download-github/lists"}