{"id":14063595,"url":"https://github.com/deadlydog/New-GitHubRelease","last_synced_at":"2025-07-29T15:34:29.160Z","repository":{"id":142144068,"uuid":"87027739","full_name":"deadlydog/New-GitHubRelease","owner":"deadlydog","description":"PowerShell module to make automating the creation of new GitHub releases easy.","archived":false,"fork":false,"pushed_at":"2023-10-14T21:36:34.000Z","size":36,"stargazers_count":7,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-04T01:34:03.702Z","etag":null,"topics":["githubrelease","hacktoberfest","powershell","powershell-module"],"latest_commit_sha":null,"homepage":"","language":"PowerShell","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/deadlydog.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"github":"deadlydog","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":"https://www.paypal.me/deadlydogDan"}},"created_at":"2017-04-03T01:13:15.000Z","updated_at":"2024-09-30T20:54:18.000Z","dependencies_parsed_at":"2023-10-15T19:36:36.224Z","dependency_job_id":null,"html_url":"https://github.com/deadlydog/New-GitHubRelease","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/deadlydog/New-GitHubRelease","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadlydog%2FNew-GitHubRelease","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadlydog%2FNew-GitHubRelease/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadlydog%2FNew-GitHubRelease/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadlydog%2FNew-GitHubRelease/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deadlydog","download_url":"https://codeload.github.com/deadlydog/New-GitHubRelease/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deadlydog%2FNew-GitHubRelease/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267709624,"owners_count":24131924,"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-07-29T02:00:12.549Z","response_time":2574,"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":["githubrelease","hacktoberfest","powershell","powershell-module"],"created_at":"2024-08-13T07:03:24.836Z","updated_at":"2025-07-29T15:34:28.882Z","avatar_url":"https://github.com/deadlydog.png","language":"PowerShell","funding_links":["https://github.com/sponsors/deadlydog","https://www.paypal.me/deadlydogDan"],"categories":["PowerShell"],"sub_categories":[],"readme":"# New-GitHubRelease PowerShell Module\n\nA PowerShell v3 compatible module to make automating the creation of new GitHub releases easy.\n\n## Getting Started\n\nYou can either download the `New-GitHubRelease.psm1` file from the [Releases page][GitHubRepoReleasesPage] directly, or [install the module from the PowerShell Gallery][PowerShellGalleryNuGetPackagePage].\n\nHere is an example of how to import the New-GitHubRelease module into your powershell session and call it:\n\n```PowerShell\nImport-Module -Name \"C:\\PathTo\\New-GitHubRelease.psm1\"\nNew-GitHubRelease -GitHubUsername 'deadlydog' -GitHubRepositoryName 'New-GitHubRelease' -GitHubAccessToken 'SomeLongHexidecimalString' -TagName 'v1.0.0'\n```\n\nA hash table with the following properties is returned:\n\n* Succeeded = $true if the Release was created successfully and all assets were uploaded to it, $false if some part of the process failed.\n* ReleaseCreationSucceeded = $true if the Release was created successfully (does not include asset uploads), $false if the Release was not created.\n* AllAssetUploadsSucceeded = $true if all assets were uploaded to the Release successfully, $false if one of them failed, $null if there were no assets to upload.\n* ReleaseUrl = The URL of the new Release that was created.\n* ErrorMessage = A message describing what went wrong in the case that Succeeded is $false.\n\n## Getting a GitHub Access Token\n\nYou can generate a GitHub Access Token on [your settings page][GitHubPersonalAccessTokensUrl] by following [these instructions][GitHubTutorialOnCreatingAnAccessTokenUrl].\nBe sure to give the Access Token `repo`/`public_repo` permissions so that it will be allowed to create a new Release.\n\n**Note:** You should _never_ hard-code your Access Token in your script (and source control). Instead prompt the user for it using something like `Read-Host`, and store it in an environmental variable for next time. [This script shows an example of how to do it][StoreAndLoadEnvironmentalVariableExampleCode].\n\n## Examples\n\n```PowerShell\n# Import the module dynamically from the PowerShell Gallery. Use CurrentUser scope to avoid having to run as admin.\nImport-Module -Name New-GitHubRelease -Scope CurrentUser\n\n# Specify the parameters required to create the release. Do it as a hash table for easier readability.\n$newGitHubReleaseParameters =\n@{\n    GitHubUsername = 'deadlydog'\n    GitHubRepositoryName = 'New-GitHubRelease'\n    GitHubAccessToken = 'SomeLongHexidecimalString'\n    ReleaseName = \"New-GitHubRelease v1.0.0\"\n    TagName = \"v1.0.0\"\n    ReleaseNotes = \"This release contains the following changes: ...\"\n    AssetFilePaths = @('C:\\MyProject\\Installer.exe','C:\\MyProject\\Documentation.md')\n    IsPreRelease = $false\n    IsDraft = $true\t# Set to true when testing so we don't publish a real release (visible to everyone) by accident.\n}\n\n# Try to create the Release on GitHub and save the results.\n$result = New-GitHubRelease @newGitHubReleaseParameters\n\n# Provide some feedback to the user based on the results.\nif ($result.Succeeded -eq $true)\n{\n    Write-Output \"Release published successfully! View it at $($result.ReleaseUrl)\"\n}\nelseif ($result.ReleaseCreationSucceeded -eq $false)\n{\n    Write-Error \"The release was not created. Error message is: $($result.ErrorMessage)\"\n}\nelseif ($result.AllAssetUploadsSucceeded -eq $false)\n{\n    Write-Error \"The release was created, but not all of the assets were uploaded to it. View it at $($result.ReleaseUrl). Error message is: $($result.ErrorMessage)\"\n}\n```\n\nAttempt to create a new Release on GitHub, and provide feedback to the user indicating if it succeeded or not.\n\n---\n\n## Full Documentation\n\nOnce the module has been imported, you can access the the latest documention in PowerShell by using `Get-Help New-GitHubRelease -Full`, or just [look at the file in source control here][DocumentationInSourceControlFile].\n\n[PowerShellGalleryNuGetPackagePage]:https://www.powershellgallery.com/packages/New-GitHubRelease/\n[GitHubRepoReleasesPage]:https://github.com/deadlydog/New-GitHubRelease/releases\n[DocumentationInSourceControlFile]:https://github.com/deadlydog/New-GitHubRelease/blob/master/src/New-GitHubRelease/New-GitHubRelease.psm1#L6\n[GitHubPersonalAccessTokensUrl]:https://github.com/settings/tokens\n[GitHubTutorialOnCreatingAnAccessTokenUrl]:https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/\n[StoreAndLoadEnvironmentalVariableExampleCode]:https://github.com/deadlydog/New-GitHubRelease/blob/master/publishTools/HelperScripts/Publish-NewReleaseToGitHub.ps1#L12\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadlydog%2FNew-GitHubRelease","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeadlydog%2FNew-GitHubRelease","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeadlydog%2FNew-GitHubRelease/lists"}