diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..4957337f --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + tags: + - "v*.*.*" + +jobs: + changelog: + name: Create release + permissions: + contents: write + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Generate a changelog + uses: orhun/git-cliff-action@v3 + id: git-cliff + with: + config: cliff.toml + args: -vv --latest --strip header + env: + OUTPUT: CHANGES.md + GITHUB_REPO: ${{ github.repository }} diff --git a/.gitignore b/.gitignore index 39fb63ff..a281b46b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,19 @@ -target +# Generated by Cargo +# will have compiled files and executables +debug/ +target/ + +# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries +# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html Cargo.lock -.envrc -default.nix -shell.nix + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb + +# Misc +*.swp +.idea +.DS_Store diff --git a/Cargo.toml b/Cargo.toml index b7e4234a..6584aee9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,11 +1,15 @@ [package] name = "docker-registry" rust-version = "1.70.0" -version = "0.5.1-alpha.0" -authors = ["Bryant Biggs ", "Luca Bruno ", "Stefan Junker "] +version = "0.6.0" +authors = [ + "Luca Bruno ", + "Stefan Junker ", + "Bryant Biggs ", +] license = "MIT OR Apache-2.0" documentation = "https://docs.rs/docker-registry" -repository = "https://github.com/clowdhaus/docker-registry-http-api-v2" +repository = "https://github.com/clowdhaus/docker-registry" description = "A pure-Rust asynchronous library for Docker Registry HTTP API v2" keywords = [ "docker", @@ -14,18 +18,11 @@ keywords = [ ] exclude = [ ".gitignore", + "certificates", + "tests", ] edition = "2021" -[package.metadata.release] -disable-publish = true -disable-push = true -post-release-commit-message = "cargo: development version bump" -pre-release-commit-message = "cargo: docker-registry release {{version}}" -sign-commit = true -sign-tag = true -tag-message = "docker-registry v{{version}}" - [dependencies] base64 = "0.22" futures = "0.3" diff --git a/README.md b/README.md index e503bd02..084bdba2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Docker Registry HTTP API v2 +# Docker Registry A pure-Rust asynchronous library for the Docker Registry HTTP API v2. diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000..3960b952 --- /dev/null +++ b/cliff.toml @@ -0,0 +1,55 @@ +# Configuration file for [`git-cliff`](https://github.com/orhun/git-cliff) +# See https://git-cliff.org/docs/configuration + +[remote.github] +owner = "clowdhaus" +repo = "docker-registry" + +[changelog] +header = """ +# Changelog + +All notable changes to this project will be documented in this file. +""" +# https://keats.github.io/tera/docs/#introduction +body = """\ +{% set gh_link = "https://github.com/" ~ remote.github.owner ~ "/" ~ remote.github.repo %}\ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}]({{ gh_link }}/releases/tag/v{{ version | trim_start_matches(pat="v") }}) - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}\ + ## [Unreleased]({{ gh_link }}/compare/{{ previous.version }}...HEAD) +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | title }} + {% for commit in commits %} + - {% if commit.scope %}[{{ commit.scope }}] {% endif %}{{ commit.message | upper_first | split(pat="\\n") | first }}\ + {% endfor %} +{% endfor %}\n +""" +trim = true +footer = """ +""" + +[git] +conventional_commits = true +filter_unconventional = false +commit_preprocessors = [] +commit_parsers = [ + { message = "^[Ff]eat", group = "Features" }, + { message = "^[Ff]ix", group = "Bug Fixes" }, + { message = "^[Dd]oc", group = "Documentation" }, + { message = ".*\\b([Dd]eps|[Dd]ependencies|[Bb]ump)\\b", group = "Dependencies" }, + { message = "^[Pp]erf", group = "Performance" }, + { message = "^[Rr]efactor", group = "Refactor" }, + { message = ".*\\b([Ss]tyle|[Ff]mt|[Ff]ormat)\\b", group = "Styling" }, + { message = "^[Tt]est", group = "Testing" }, + { message = "^[Cc]hore", group = "Miscellaneous Tasks" }, + + { message = ".*", group = "Other" }, +] +protect_breaking_commits = false +filter_commits = false +tag_pattern = "v[0-9]*" +skip_tags = "beta|alpha" +ignore_tags = "rc" +sort_commits = "newest" diff --git a/src/lib.rs b/src/lib.rs index 06b1e014..7d3e7124 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -48,7 +48,7 @@ use base64::prelude::*; use errors::{Error, Result}; /// Default User-Agent client identity. -pub static USER_AGENT: &str = "camallo-docker_registry/0.0"; +pub static USER_AGENT: &str = "clowdhaus/docker-registry/0.0"; /// Get registry credentials from a JSON config reader. ///