Code Monkey home page Code Monkey logo

githubuploadtask's Introduction

GitHubUploadTask

This is a task for Ant that allows you to automatically upload files to the GitHub download section. This is therefor suited for automatic dist targets.

How to use it

Add the following to your build.xml file

<path id="githubhuploadtask.classpath">
	<pathelement location="."/>
	<fileset dir="location/ofjar">
		<include name="**/*.jar"/>
	</fileset>
</path>
<taskdef name="upload" classname="no.kinsey.ant.GitHubUploadTask" classpathref="githubhuploadtask.classpath" loaderref="githubhuploadtask.classpath.loader" />

Now you can use the upload task

<upload user="${github.user}" repo="${github.repo}" username="${github.username}" token="${github.token}" description="just a test" path="${basedir}/file.zip" />

Example

The GitHubUploadTask uses the task itself to upload the finished build to GitHub, so check out build.xml

In this project the user, repo and username needed for upload is stored in build.properties.

github.user = oyvindkinsey
github.repo = GitHubUploadTask
github.username = oyvindkinsey

Since this is a public repository the token is kept secret and is supplied using a private build.private.properties file, but it could also be supplied using a build system or on the command line like this

ant upload -Dgithub.token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

License

This is licensed under the MIT license

Author

The author is Øyvind Sean Kinsey ([email protected] / http://kinsey.no)

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.