Git Product home page Git Product logo

pyuploadtool's Introduction

pyuploadtool

A build-system-agnostic tool for creating releases and uploading artifacts on various hosting providers.

Inspired by uploadtool, but much better in so many ways...

Projects using pyuploadtool

... and a lot more! Some projects can be found on GitHub.

Usage

Using this tool is fairly straightforward. Ideally, in one of the supported build environments, all you have to do is to run it! The tool figures out its configuration from the environment variables (which either are provided by the build system, or set by the user).

Please see the following sections for more information on how to use the tool with the supported build systems and release hosting providers.

Supported build systems

This tool supports various build systems. Build system implementations are used to read metadata about a release from the environment, e.g., by processing available environment variables.

GitHub actions

To use the tool with GitHub actions, all you have to do is to provide GITHUB_TOKEN in the environment of your upload step.

The tool can easily upload files to GitHub releases if you make the GITHUB_TOKEN secret available as environment variable.

An example pipeline step look like this:

      - name: Create release and upload artifacts
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
            wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
            chmod +x pyuploadtool-x86_64.AppImage
            ./pyuploadtool-x86_64.AppImage myfile myotherfile

If you want to upload to WebDAV, too, you could use the following step:

An example pipeline step look like this:

      - name: Create release and upload artifacts
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          WEBDAV_URL: ${{ secrets.WEBDAV_URL }}
          WEBDAV_USER: ${{ secrets.WEBDAV_USER }}
          WEBDAV_PASSWORD: ${{ secrets.WEBDAV_PASSWORD }}
        run: |
            wget -q https://github.com/TheAssassin/pyuploadtool/releases/download/continuous/pyuploadtool-x86_64.AppImage
            chmod +x pyuploadtool-x86_64.AppImage
            ./pyuploadtool-x86_64.AppImage myfile myotherfile

Supported releases hosting providers

GitHub releases

Uploading data on GitHub releases is currently supported out of the box with GitHub actions.

By default, the release is marked as Stable for tags, and Prerelease for continuous builds, which are released with the tag name continuous. It is possible to override the tag name and release type, with the following environment variables:

  • GITHUB_CONTINUOUS_RELEASE_TYPE: type of release to be published. (supported values: stable, prerelease, default: stable for tags, prerelease otherwise)
  • GITHUB_CONTINUOUS_RELEASE_NAME: The title of the release (default: "Continuous Build")
  • GITHUB_CONTINUOUS_RELEASE_TAG: The tag used for release (default: continuous)

WebDAV

You can upload to any WebDAV server which supports PUT operations. The following environment variables need to be set:

  • $WEBDAV_URL: URL to the directory on the WebDAV server where you want to put your files
  • $WEBDAV_USER: name of user authorized to upload
  • $WEBDAV_PASSWORD: user's password
  • $WEBDAV_RELEASE_NAME: name of the release directory (optional on GitHub actions)

Note: Secrets must not be stored inside the repository, nor be visible to end users. You need to store them securely, ideally using the credentials storage your build system provides (on GitHub actions, there's Secrets, for instance).

Changelog Generation

pyuploadtool support Changelog generation, which is optional, and can be enabled with the CHANGELOG_TYPE environment variable.

CHANGELOG_TYPE=standard ./pyuploadtool*.AppImage

Changelog Types

CHANGELOG_TYPE can have any of the following values:

  • CHANGELOG_TYPE=none, to disable generating Changelog (default)
  • CHANGELOG_TYPE=standard, Standard Changelog
  • CHANGELOG_TYPE=conventional, Conventional changelog, follows the Conventional Commit Spec which classifies your commits as Features, Bug Fixes, etc, provided your commits follow the spec.

By default, CHANGELOG_TYPE is none unless explicitly specified.

pyuploadtool's People

Contributors

theassassin avatar srevinsaju avatar

Watchers

James Cloos avatar  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.