autocrate (0.1.0-prealpha.1)

Published 2024-01-28 01:58:14 +01:00 by PlexSheep in PlexSheep/autocrate

Installation

[registry]
default = "forgejo"

[registries.forgejo]
index = "sparse+" # Sparse index
# index = "" # Git

[net]
git-fetch-with-cli = true
cargo add autocrate@0.1.0-prealpha.1

About this package

Release Manager for Your Projects on Gitea, GitHub, and GitLab

Autocrate

Project badge Crates.io License Gitea Release Gitea language count cargo checks and tests

logo

Disclaimer: I've generated the Readme and logo with the help of so called AI tools and modified them afterwards.

Autocrate simplifies the creation and maintenance of releases for your Rust projects hosted on Gitea servers. By providing essential functionalities like uploading artifacts, publishing crates, and managing changelogs, Autocrate streamlines the release process, allowing developers to focus on their work. Although initially built for Gitea, we plan to extend support for additional platforms such as GitHub and GitLab.

Take a look at the scripts directory! publish.sh and release.sh are exactly what I'm trying to get rid of.

Features

  • Create and update releases on your Gitea server
  • Publish crates to Cargo.rs or other repositories directly from your Rust projects
  • Upload artifacts, including documentation and binaries, alongside your releases
  • Generate and maintain changelogs and release notes.

Upcoming Features

My goal is to continuously enhance Autocrate to better serve the developer community. Some planned improvements include supporting other popular hosting platforms, enabling even greater flexibility and convenience.

Getting Started

Before getting started with Autocrate, make sure you have the necessary prerequisites covered:

Installing

Once the above pre-requisites are met, begin setting up Autocrate by running the following command in your terminal:

$ cargo install autocrate

This command downloads from crates.io and compiles Autocrate locally, making it readily accessible through your command line interfaces.

Configuring Autocrate

Create a YAML file named .autocrate.yml (or .yaml) in the root of your Git repository. It should contain the following parameters (replace the placeholders):

Parent Key Value Explanation
(root) changelog list of keys with this as parent (git-log etc) information on how a changelog is generated
changelog enable true/false If false, no changelog will be generated
changelog git-log true/false should a changelog be generated with git log?
(root) uses list of keys with this as parent (cargo etc) Marks features to be used by Autocrate
uses cargo list of keys with this as parent (publish etc) tells us that your project uses cargo
cargo publish true/false should we publish crates?
cargo registries registries see this A list of registries we should publish to. If empty defaults to crates.io.
(root) api list of names, which each have the same keys defines the api we talk to
api.NAME type one of gitea,github,gitlab (currently only support for gitea Let's us know which api type we are talking to
api.NAME endpoint Base URL of the target server Let's us know which api type we are talking to
api.NAME auth list of keys with this as parent (user and pass) We probably need authentication on the target server
api.NAME.auth user a string Which user should we try to authenticate as
api.NAME.auth pass a string A secret for authentication o the server, probably a token

An example .autocrate.yaml could look like this:

changelog:
  enable: true
  git-log: true

uses:
  cargo:
    publish: true
  # tokens are loaded from ~/.cargo/config.toml
    registries:
    - default
    - cscherr

api:
  github:
    type: github
    endpoint: https://github.com
    auth:
      user: PlexSheep
      pass: token_superimportantsecret
  cscherr:
    type: gitea
    endpoint: https://git.cscherr.de
    auth:
      user: PlexSheep
      pass: Bearer importantsecrettoken

After Autocrate has been bootstrapped, you it will be released and published with itself, so you can take a look at this repositories .autocrate.yaml.

Using Autocrate

TBD

Licensing

Autocrate is free software.

The Autocrate project is distributed under the terms of the GPL-3 License. Please refer to LICENSE for complete licensing details.

Project status

The project has started recently and is currently in pre-alpha.

Contributing

I'd be very happy to get contributions! Although the master repository is on my self hosted git server, you're free to create issues, PRs and so on on GitHub. If enough activity comes around, moving to GitHub might be a good idea.

If you have any questions, use issues and discussions tabs or write me an email to software@cscherr.de

Dependencies

ID Version
anyhow ^1.0.79
cargo ^0.76.0
clap ^4.4.18
clap-verbosity-flag ^2.1.2
git2 ^0.18.1
libpt ^0.3.11
serde ^1.0.195
serde_yaml ^0.9.30
tempfile ^3.9.0
thiserror ^1.0.56
url ^2.5.0

Keywords

continuous-delivery workflow-automation gitea changelog automated-builds
Details
Cargo
2024-01-28 01:58:14 +01:00
20
Christoph J. Scherr <software@cscherr.de>
GPL-3.0-or-later
92 KiB
Assets (1)
Versions (3) View all
0.1.0-prealpha.3 2024-02-24
0.1.0-prealpha.1 2024-01-28
0.1.0-prealpha.0 2024-01-24