Giter Club home page Giter Club logo

githubreleasemanager's Introduction

GitHubReleaseMangaer

A PowerShell module for automating GitHub releases

PowerShell Edition Support

  • Desktop: 5.x
  • Core: v6.0.0-alpha.14

Usage

Before you start you'll need to create a Personal Access Token with the following scopes:

  • repo
    • repo:status
    • repo_deployment
    • public_repo

Once you have your token open PowerShell follow these steps:

  • Set session information
Set-GitHubSessionInformation -Username user -APIKey xxxxxxxxxxxxxxxxxxx
  • Create a release with associated assets
$Asset @ {
    "Path" = ".\Release\MyRepositoryAsset.zip
    "Content-Type" = "application/zip"
}

New-GitHubRelease -Repository TestRepository -Name TestRelease -Description "Test v1.0 release" -Target master -Tag v1.0 -Assets $Asset

The module can also be used with PSake. Here is an example build task:

Task CreateGitHubRelease {

    Set-GitHubSessionInformation -UserName $GitHubUsername -APIKey $GithubAPIKey -Verbose:$VerbosePreference | Out-Null

    $CurrentModuleVersion = (Import-PowerShellDataFile -Path $ModuleManifestPath).ModuleVersion

    Write-Verbose -Message "Current module version is $($CurrentModuleVersion)"

    $AssetPath = "$($OutDir)\$($ModuleName)-$($CurrentModuleVersion).zip"

    Write-Verbose -Message "Asset path is $($AssetPath)"

    $Asset = @{
        "Path" = $AssetPath
        "Content-Type" = "application/zip"
    }

    New-GitHubRelease -Repository $GithubRepositoryName -Name $ModuleName -Target $GitHubReleaseTarget -Tag "v$($CurrentModuleVersion)" -Assets $Asset -Verbose:$VerbosePreference -Confirm:$false | Out-Null

}

Help

Each function provided with this module has inbuilt help.

Get-Help New-GitHubRelease -Full

Alternatively you can view documentation on ReadTheDocs here.

Contribute

Contributions are welcome! Please feel free to create pull requests and log issues.

githubreleasemanager's People

Contributors

chelnak avatar vatioz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.