Giter Site home page Giter Site logo

gh-release's Introduction

gh-release

Utility for creating, deleting, and uploading files to Github Releases.

GitHub Workflow Status

Getting gh-release

Download and uncompress the appropriate binary from releases.

Using gh-release

You need to have a Github personal access token defined in your environment as GITHUB_ACCESS_TOKEN.

$ gh-release 
Usage: gh-release create|destroy <reponame> <version> [branch] [name]

Creating a release with assets

Put any assets you want to upload with your release into a release directory. Then call gh-release. Here is an example:

$ gh-release create progrium/gh-release 1.0.0

This will create a tagged release v1.0.0 then upload any files found in the ./release directory. Optional arguments you can pass include the branch to tag the release from and a name for the release.

See this project's Makefile for a real example of using it in a Makefile.

Destroying a release

You can destroy a release by the version number you used to create the release:

$ gh-release destroy progrium/gh-release 1.0.0

This destroys the release and its assets, as well as the v1.0.0 tag created for the release.

Sponsor

This project was made possible thanks to DigitalOcean.

License

BSD

gh-release's People

Contributors

databus23 avatar jimmidyson avatar josegonzalez avatar jtopjian avatar jwerle avatar lalyos avatar progrium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gh-release's Issues

Make repo as deprecated/not working

Hi,

it appears like eveything here became outdated. The go app fails silently because it can't find some upload url, the bash script doesn't call main and calls a undefined 'upload-url' function. All in all this looks completely broken. That's fine but please mark it that way so other won't spend time debugging this

Panic on slice bounds

I have an executable in the release/ folder, the release seems to get created and a tag created too, but no files are actually uploaded against the release.

panic: runtime error: slice bounds out of range

goroutine 1 [running]:
main.MimeType(0xc20800a030, 0x1, 0x1)
    /home/ubuntu/gh-release/gh-release.go:65 +0x35d
github.com/progrium/go-basher.(*Context).HandleFuncs(0xc20805e000, 0xc20800a000, 0x4, 0x4, 0x0)
    /home/ubuntu/.go_workspace/src/github.com/progrium/go-basher/basher.go:174 +0x2e5
github.com/progrium/go-basher.Application(0xc20803a420, 0xc20805af68, 0x1, 0x1, 0x193478, 0x1)
    /home/ubuntu/.go_workspace/src/github.com/progrium/go-basher/basher.go:56 +0x30e
main.main()
    /home/ubuntu/gh-release/gh-release.go:106 +0x21c

goroutine 2 [runnable]:
runtime.forcegchelper()
    /usr/local/go/src/runtime/proc.go:90
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 3 [runnable]:
runtime.bgsweep()
    /usr/local/go/src/runtime/mgc0.go:82
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

goroutine 4 [runnable]:
runtime.runfinq()
    /usr/local/go/src/runtime/malloc.go:712
runtime.goexit()
    /usr/local/go/src/runtime/asm_amd64.s:2232 +0x1

Fails to run in Fedora with syntax error in /tmp/bashenv.* file

Hi,

gh-release version 2.2.1 is failing in Fedora 25 with some syntax error on bash:

budhram@dhcp35-83:/tmp ] $ ./gh-release
/tmp/bashenv.668511317: line 83: syntax error near unexpected token `('
/tmp/bashenv.668511317: line 83: `export BASH_FUNC_module()=$'() {  eval `/usr/bin/modulecmd bash $*`'
/home/budhram/.basher/bash: main: command not found

My bash version:

$ bash --version
GNU bash, version 4.3.43(1)-release (x86_64-redhat-linux-gnu)

Any idea why I am getting this error?

Asset uploads broken

Gets back:

{"message":"Invalid name for request","request_id":"..."}

URL trying to upload to is:

https://uploads.github.com/repos/fabric8io/gofabric8/releases/1808573/assets?name,label=<SNIP>

Looks like a change on the github API side when returning upload URLs.

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.