Coder Social home page Coder Social logo

orhun / automated-rust-releases Goto Github PK

View Code? Open in Web Editor NEW
14.0 2.0 0.0 28 KB

Home Page: https://blog.orhun.dev/automated-rust-releases

License: MIT License

Rust 100.00%
automating cargo ci ci-automation github-actions release release-automation rust rustlang

automated-rust-releases's Introduction

Automated Rust Releases ๐Ÿฆ€

This repository contains the configuration files for fully automating Rust releases via utilizing the following tools:

Tool Description Function
git-cliff A highly customizable Changelog Generator. Automates the changelog generation.
release-plz Publish Rust crates from CI with a Release PR. Handles dependency updates, version management, and crates.io release.
cargo-dist Shippable application packaging for Rust. Creates GitHub releases and packaging for various platforms.
Dependabot Automated dependency updates built into GitHub. Updates the Rust and GitHub Actions dependencies.
Mergify Automated CI/CD tool for optimization. Automatically merges the Dependabot pull requests.

For more information, read the blog post: https://blog.orhun.dev/automated-rust-releases

automated-rust-releases's People

Contributors

jwodder avatar orhun avatar

Stargazers

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

Watchers

 avatar  avatar

automated-rust-releases's Issues

Release workflow fails on `plan` step

First, thanks for putting together your blog post and this repo, it's really helpful.

I've replicated your workflows and setup in my own repo. I created a branch, pushed some commits, then opened a PR. The cargo dist plan step fails in the PR's checks because cargo-dist can't parse the tag name:

Run cargo dist plan --tag=2/merge --output-format=json > dist-manifest.json
analyzing workspace:
  ร— Couldn't parse the version from the provided announcement tag (2/merge)
  โ•ฐโ”€โ–ถ unexpected character 'm' while parsing major version number

I believe this is related to the use of github.ref_name for the --tag option to cargo dist. I found this GitHub issue which discusses how ref_name is different for a PR than in other contexts. There was actually a PR just last week to update the documentation to clarify the difference.

There's a couple other places in that run script where ref_name needs to be changed as well.

LMK if you think this belongs as an issue in cargo-dist instead.

The upshot is that I think you want to do something like the following in the plan step:

if [ "${{ github.event_name }}" == "pull_request" ]; then
  ref_name=${{ github.base_ref }}
else
  ref_name=${{ github.ref_name }}
fi
cargo dist plan --tag=${ref_name} --output-format=json > dist-manifest.json

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.