{"id":15011545,"url":"https://github.com/bmtlab/nuget-package-check-action","last_synced_at":"2025-04-12T03:43:49.371Z","repository":{"id":234160654,"uuid":"788360962","full_name":"BMTLab/nuget-package-check-action","owner":"BMTLab","description":"Simple GitHub Action automates check for the existence of NuGet packages with no dependencies, ensuring that a package is available and indexed on nuget.org. It supports multiple validation attempts and suspends CI/CD workflows until the package is published","archived":false,"fork":false,"pushed_at":"2024-10-29T09:54:36.000Z","size":1136,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T11:55:09.794Z","etag":null,"topics":["dotnet","github-actions","nuget","version-check","workflow"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/nuget-package-availability-checker","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BMTLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-18T09:08:42.000Z","updated_at":"2024-09-27T08:58:50.000Z","dependencies_parsed_at":"2024-05-09T15:09:09.084Z","dependency_job_id":"99139a63-cedc-4c61-a0a1-505ebd791a1f","html_url":"https://github.com/BMTLab/nuget-package-check-action","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.1428571428571429,"last_synced_commit":"8b5f3211448edf4d3c9b46a66e0771e75d5e2206"},"previous_names":["bmtlab/nuget-package-checker"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BMTLab%2Fnuget-package-check-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BMTLab%2Fnuget-package-check-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BMTLab%2Fnuget-package-check-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BMTLab%2Fnuget-package-check-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BMTLab","download_url":"https://codeload.github.com/BMTLab/nuget-package-check-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248514212,"owners_count":21116899,"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":["dotnet","github-actions","nuget","version-check","workflow"],"created_at":"2024-09-24T19:41:13.859Z","updated_at":"2025-04-12T03:43:49.353Z","avatar_url":"https://github.com/BMTLab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nuget-package-check-action\n\n[![Release](https://img.shields.io/github/release/BMTLab/nuget-package-check-action.svg?label=latest%20release\u0026color=0266d6)](https://github.com/BMTLab/nuget-package-check-action/releases/latest)\n[![CI](https://github.com/BMTLab/nuget-package-check-action/actions/workflows/ci.yml/badge.svg)](https://github.com/BMTLab/nuget-package-check-action/actions/workflows/ci.yml)\n[![CodeQL](https://github.com/BMTLab/nuget-package-check-action/actions/workflows/github-code-scanning/codeql/badge.svg?branch=main)](https://github.com/BMTLab/nuget-package-check-action/actions/workflows/github-code-scanning/codeql)\n[![codecov](https://codecov.io/gh/BMTLab/nuget-package-check-action/graph/badge.svg?token=YGYDJTTSQB)](https://codecov.io/gh/BMTLab/nuget-package-check-action)\n\n- [x] Automates NuGet package availability checks, ensuring packages exist and are indexed on [nuget.org](https://nuget.org).\n- [x] Supports multiple verification attempts and can suspend CI/CD workflows until the package is published.\n- [x] Simple and fast. Works natively without Dockerfile and no need for dotnet, and other dependencies.\n\n## How to use\n\n:white_check_mark: To quickly check if the package exists and is available on NuGet, please add the following job:\n\n```yaml\n- name: Check Available NuGet Package\n  uses: BMTLab/nuget-package-check-action@v1.5.3\n  with:\n    package: Your.AwesomePackage\n    version: 1.3.505\n```\n\n:white_check_mark: If your workflow publishes a package and further work requires that the package is already available and indexed,\nplease set a reasonable number of retries:\n\n\u003e [!TIP]\n\u003e The retry interval is 30 seconds,\nso 10 retries are usually enough time between publishing and when the package is indexed and available.\n\n```yaml\n- name: Check Available NuGet Package\n  id: check-nuget-package\n  uses: BMTLab/nuget-package-check-action@v1.5.3\n  with:\n    package: Your.AwesomePackage # 👈🏻 Any valid NuGet Package name, case-insensitive\n    version: 1.3.505.01-beta     # 👈🏻 Version without any prefix ('v' e.g), case-insensitive\n    # 1, 1.0, 1.0.0 and 1.0.0.0 are suitable, \n    # it is also possible to specify the suffix via '-'\n\n    attempts: 10 # The value must be \u003e 0\n  continue-on-error: true\n```\n\n:x: Input values will be validated, you will get an error if the format is incorrect.\n\n### Outputs\n\n:x: The job will terminate with an error if no package is found, please add `continue-on-error: true` to just get the checking result and not fail your workflow.\n\nThe action sets an output variable called `indexed`, which can be used in the following step by using: \n\n`${{ steps.check-nuget-package.outputs.indexed}}`, that can only have `'true'` or `'false'` values.\n\n#### Example output usage\n\n```yaml\n- name: Push NuGet for ${{ env.PACKAGE_NAME }}\n  if: ${{ steps.check-nuget-package.outputs.indexed != 'true' }}\n  run: dotnet nuget push ./*.nupkg --source ${{ env.NUGET_URL }} --api-key ${{ secrets.NUGET_API_KEY }}\n```\n\n#### Action output log\n\n```text\n⮞ Run BMTLab/nuget-package-check-action@v1.5.3\nStarting NuGet Package Index Checker...\nPackage Name: BMTLab.OneOf.Reduced\nPackage Version: 4.1.0424\nAttempt 1 of 12: Package not indexed yet. Retrying in 30 seconds...\nAttempt 2 of 12: Package not indexed yet. Retrying in 30 seconds...\nPackage BMTLab.OneOf.Reduced version 4.1.0424 is indexed on nuget.org.\nPackage indexed status: true\n```\n\n## Compatibility\n| Ubuntu    | Windows |       MacOS |\n|:----------|:-------:|------------:|\n| :white_check_mark:  |  :white_check_mark:  | :white_check_mark: |\n\n\u003e [!IMPORTANT]\n\u003e When you're using self-hosted runners, please make sure you have _Node.js v20_ installed!\n\n****************************\nIf you just want a script that does a package check, check out my **gist** with a bash script here: \n[check-nuget-pkg-indexed.sh](https://gist.github.com/BMTLab/28709f017c338a53e5845d04c00e6eb9)\n\n## [Contributing](CONTRIBUTING.md)\nPlease feel free to fork this, contribute or let me know if you find a bug. \nAlso, any ideas for improvement would be appreciated :innocent:\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmtlab%2Fnuget-package-check-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmtlab%2Fnuget-package-check-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmtlab%2Fnuget-package-check-action/lists"}