Giter Site home page Giter Site logo

huwb / cargo-deliver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mre/cargo-deliver

0.0 2.0 0.0 23 KB

๐Ÿ“ฆ Run goreleaser with cargo to publish pre-built Rust binaries on Github/Dockerhub/Artifactory

License: MIT License

Rust 100.00%

cargo-deliver's Introduction

cargo-deliver

What is it?

This will use goreleaser to deploy your Rust binaries to Github/Artifactory/Dockerhub. It's still experimental and will only work once/if Rust support gets added to goreleaser.

Installation

cargo install cargo-deliver

To upgrade:

cargo install --force cargo-deliver

Or clone and build with $ cargo build --release then place in your $PATH.

Usage

  1. Add a .goreleaser.yml to your project. Here is an example:
rust:
- target:
  - x86_64-apple-darwin
  binary: cargo-deliver

# Archive customization
archive:
  format: tar.gz
  replacements:
    amd64: 64-bit
    darwin: macOS
    linux: Linux

This will build your Rust application as a static binary for macOS and as a tar.gz archive.
For all possible options, see the goreleaser docs.

You can get a list of all possible targets with

rustc --print target-list
  1. Tag your current commit, e.g.
git tag -a "v0.1.0"
  1. If you want to deploy to Github, you need to export a GITHUB_TOKEN environment variable, which should contain a GitHub token with the repo scope selected. It will be used to deploy releases to your GitHub repository. Create a token here.

  2. Run the following command

cargo deliver

Similar tools

  • cargo-docker - A cargo subcommand to build Rust code inside a Docker and get the result back.
  • cargo-hublish - A cargo subcommand for publishing Rust projects to Github (not supporting different build targets).

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.