{"id":21344151,"url":"https://github.com/klakegg/github-upload","last_synced_at":"2025-10-13T09:40:47.979Z","repository":{"id":63889012,"uuid":"214637953","full_name":"klakegg/github-upload","owner":"klakegg","description":"Upload assets to Github with ease.","archived":false,"fork":false,"pushed_at":"2019-10-27T08:12:30.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-23T05:19:03.687Z","etag":null,"topics":["github-action","github-release"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/klakegg.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-10-12T11:46:35.000Z","updated_at":"2019-10-27T08:12:32.000Z","dependencies_parsed_at":"2023-01-14T12:00:22.844Z","dependency_job_id":null,"html_url":"https://github.com/klakegg/github-upload","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"d109a0abddb771845136e49096c2455db2ad2ebd"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/klakegg/github-upload","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klakegg%2Fgithub-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klakegg%2Fgithub-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klakegg%2Fgithub-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klakegg%2Fgithub-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klakegg","download_url":"https://codeload.github.com/klakegg/github-upload/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klakegg%2Fgithub-upload/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014565,"owners_count":26085536,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["github-action","github-release"],"created_at":"2024-11-22T01:17:26.496Z","updated_at":"2025-10-13T09:40:47.950Z","avatar_url":"https://github.com/klakegg.png","language":"Shell","readme":"# Github Upload\n\nThis action assists you in uploading your asset(s) to your project release page. You are free to choose between using [static configuration](#static-configuration) (with support for variables) and [scripted configuration](#scripted-configuration) depending on what you need for your project.\n\nWant to upload from your own build server? [Yes, it is supported.](#usage-outside-github)\n\n\n## Static configuration\n\nWhen you know up front exactly the files to be uploaded may static configuration be the best choice for your project.\n\n\n### Single file\n\nWhen uploading a single file using parameter `file` may you specify all aspects supported by Github. Parameters `name`, `label` and `type` is a [reflection of the Github API](https://developer.github.com/v3/repos/releases/#upload-a-release-asset).\n\nAvailable parameters:\n\n* `file` - The file to be uploaded. (Mandatory)\n* `name` - Filename when uploaded. Default to the filename of `file`.\n* `label` - Label replacing filename on release page. Not set unless provided.\n* `type` - Content type of your file. Default is to detect using [file](https://github.com/file/file).\n\nSimple example where the file is uploaded without extra information:\n\n```yaml\n- uses: klakegg/github-upload@v0.9.1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    file: dist/project.zip\n```\n\nExample where extra information is provided, and where the uploaded filename contains the tag of the build:\n\n```yaml\n- uses: klakegg/github-upload@v0.9.1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    file: dist/project.zip\n    name: project-${TAG}.zip\n    label: Complete project package\n    type: application/zip\n```\n\n\n### Multiple files\n\nParameter `files` is used to upload multiple files at once. This implementation passes the parameter to [ls](https://www.gnu.org/software/coreutils/ls) for discovery of files.\n\nParameter `type` may be used to pass on content type, however other parameters are not supported. Scipted configuration may be an option if you find this too limiting.\n\nExample of uploading zip files made available in a defined folder:\n\n```yaml\n- uses: klakegg/github-upload@v0.9.1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    files: dist/*.zip\n    type: application/zip\n```\n\n\n## Scripted configuration\n\nScripted configuration may be used when static configuration does not fit your project.\n\nThis is an ption where you are free to make whatever logic you want for your upload, and simply call the [`upload`](#command-upload) to perform upload as part of the logic.\n\nScript for handling may be provided inline as part of the workflow definition using the `script` parameter, or you may point to a script file using the `script_path` parameter.\n\nExample where the script is part of the step definition:\n\n```yaml\n- uses: klakegg/github-upload@v0.9.1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    script: |\n      upload \\\n        -f dist/project.zip \\\n        -n project-${TAG}.zip\n```\n\nExample where script is provided as a file in the repository:\n\n```yaml\n- uses: klakegg/github-upload@v0.9.1\n  env:\n    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n  with:\n    script_path: .github/uploads.sh\n```\n\n\n## Command: upload\n\nThe `upload` command may be used in the script to trigger upload of an asset.\n\nExample of use:\n\n```shell\nupload \\\n  -f \"target/distribution.zip\" \\\n  -n \"distribution-${TAG}.zip\" \\\n  -l \"Distribution (zip)\" \\\n  -t \"application/zip\"\n```\n\nArguments:\n\n* `-f` - The file to be uploaded. (Mandatory)\n* `-n` - Filename when uploaded. Default to the filename of `file`.\n* `-l` - Label replacing filename on release page. Not set unless provided.\n* `-t` - Content type of your file. Default is to detect using [file](https://github.com/file/file).\n\n\n## Variables\n\nThe following extra variables are made available during execution:\n\n* `TAG` - Git tag extracted from the provided `GITHUB_REF`, e.g. `v1.0`.\n* `UPLOAD_URL` - URL used to upload assets.\n\n\n## Usage outside Github\n\nThis project may be used also outside Github Actions to perform upload of assets to Github by using the [Docker image](https://hub.docker.com/r/klakegg/github-upload) used by the action.\n\nThe following environment variables need to be provided to make this happen:\n\n* `GITHUB_REPOSITORY` - Repository where the project may be found, e.g. `klakegg/github-upload`.\n* `GITHUB_TOKEN` - Token provided by Github to get access.\n* `GITHUB_ACTOR` - The owner of `GITHUB_TOKEN`, e.g. `klakegg.`\n* `GITHUB_REF` or `TAG` - Tag reference when using `GITHUB_REF`, e.g. `refs/tags/v0.9.1` or simply the tag when using `TAG`, e.g. `v0.9.1`.\n\nAll parameters and logic are the same as described above, except they have to be passed as environment variables prefixed with `INPUT_` and as uppercase. E.g. parameter `file` becomes environment variable `INPUT_FILE`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklakegg%2Fgithub-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklakegg%2Fgithub-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklakegg%2Fgithub-upload/lists"}