|
1 | | -<div align="center"><a name="readme-top"></a> |
| 1 | +<div align="center" markdown> |
2 | 2 |
|
3 | 3 |  |
4 | 4 |
|
5 | 5 | [](https://github.com/copier-org/copier) |
| 6 | +[](https://github.com/liblaf/copier-release/actions/workflows/release-pr.yaml) |
| 7 | +[](https://github.com/liblaf/copier-release/actions/workflows/release-draft.yaml) |
| 8 | +[](https://github.com/liblaf/copier-release/actions/workflows/release-publish.yaml) |
6 | 9 |
|
7 | | -[Changelog](https://github.com/liblaf/copier-release/blob/main/CHANGELOG.md) · [Report Bug](https://github.com/liblaf/copier-release/issues) · [Request Feature](https://github.com/liblaf/copier-release/issues) |
| 10 | +[Copier Docs](https://copier.readthedocs.io/) · [Changelog](https://github.com/liblaf/copier-release/blob/main/CHANGELOG.md) · [Report Bug](https://github.com/liblaf/copier-release/issues) · [Request Feature](https://github.com/liblaf/copier-release/issues) |
8 | 11 |
|
9 | | - |
| 12 | + |
10 | 13 |
|
11 | 14 | </div> |
12 | 15 |
|
13 | | -## ✨ Features |
| 16 | +## 🚀 Overview |
14 | 17 |
|
15 | | -- 🤖 **Automated Releases:** Configures Release Please to automatically generate version bumps and changelogs based on conventional commits; |
16 | | -- 🧩 **Multi-Language Support:** Supports multiple project types including Go, Node.js, Python, Rust, and simple projects; |
17 | | -- 🔧 **Customizable Configuration:** Provides flexible changelog sections with organized categories for features, fixes, docs, and more; |
18 | | -- 📝 **Clean Output:** Generates well-formatted changelogs with proper section organization and emoji prefixes for better readability; |
| 18 | +`copier-release` is a Copier template for repositories that want a clean, mostly hands-off GitHub release flow. |
19 | 19 |
|
20 | | -## 📦 Installation |
| 20 | +- ✨ Opens a release PR from conventional commits pushed to `main` |
| 21 | +- 📝 Generates and updates `CHANGELOG.md` with `git-cliff` |
| 22 | +- 🏷️ Tags the merged release commit and creates a draft GitHub release |
| 23 | +- ⏰ Publishes draft releases automatically after 6 hours |
| 24 | +- 📦 Bumps `package.json` automatically when the file exists |
| 25 | +- 🧩 Leaves package publishing and asset uploads to your own project workflows |
21 | 26 |
|
22 | | -To install `gh:liblaf/copier-release`, run the following command: |
| 27 | +## 📦 Apply The Template |
| 28 | + |
| 29 | +> [!IMPORTANT] |
| 30 | +> Use `--trust` when applying or updating this template. It runs Copier tasks during generation. |
23 | 31 |
|
24 | 32 | ```bash |
25 | 33 | copier copy --trust gh:liblaf/copier-release . |
26 | 34 | ``` |
27 | 35 |
|
28 | | -## ⌨️ Local Development |
| 36 | +## 🔄 Update The Template |
29 | 37 |
|
30 | | -You can use Github Codespaces for online development: |
| 38 | +```bash |
| 39 | +copier recopy --trust --answers-file '.config/copier/.copier-answers.release.yaml' |
| 40 | +``` |
31 | 41 |
|
32 | | -[](https://codespaces.new/liblaf/copier-release) |
| 42 | +## 🧱 What You Get |
33 | 43 |
|
34 | | -Or clone it for local development: |
| 44 | +| File | Purpose | |
| 45 | +| --- | --- | |
| 46 | +| `.github/workflows/release-pr.yaml` | Calculates the next version, updates the changelog, and opens a release PR on pushes to `main`. | |
| 47 | +| `.github/workflows/release-draft.yaml` | Runs after a merged release PR, creates the Git tag, and creates a draft GitHub release. | |
| 48 | +| `.github/workflows/release-publish.yaml` | Runs hourly or on demand and publishes draft releases older than 6 hours. | |
| 49 | +| `.config/copier/.copier-answers.release.yaml` | Stores Copier answers so future `copier recopy` runs stay reproducible. | |
35 | 50 |
|
36 | | -```bash |
37 | | -git clone https://github.com/liblaf/copier-release.git |
38 | | -cd copier-release |
| 51 | +> [!NOTE] |
| 52 | +> The changelog format is maintained centrally in this repository through a shared `git-cliff` config. Generated repositories do not need to copy a local `cliff.toml`. |
| 53 | +
|
| 54 | +## 🔐 Required GitHub Setup |
| 55 | + |
| 56 | +Create a GitHub Actions environment named `Release Please`, then provide: |
| 57 | + |
| 58 | +- `vars.APP_ID` |
| 59 | +- `secrets.PRIVATE_KEY` |
| 60 | + |
| 61 | +These credentials are used by the workflows to open release PRs, push tags, create draft releases, and publish them later. |
| 62 | + |
| 63 | +## 🔁 Release Flow |
| 64 | + |
| 65 | +1. Push commits using the Conventional Commits format such as `feat:`, `fix:`, `docs:`, or `ci:`. |
| 66 | +2. `release-pr.yaml` runs on pushes to `main` and opens a release PR with changelog updates and version bumps where applicable. |
| 67 | +3. Merge the release PR yourself, or approve it and let [`mergery[bot]`](https://github.com/apps/mergery) merge it once the merge button is green. |
| 68 | +4. `release-draft.yaml` tags the merge commit and creates a draft GitHub release. |
| 69 | +5. Your own workflows can publish packages, build artifacts, and upload release assets. Those jobs are intentionally not included in this template. |
| 70 | +6. `release-publish.yaml` publishes the draft release after it has been sitting for 6 hours, which gives your publish jobs time to finish. |
| 71 | + |
| 72 | +## 🧭 Commit Guidance |
| 73 | + |
| 74 | +Stick to Conventional Commits if you want predictable version bumps and a well-structured changelog. |
| 75 | + |
| 76 | +```text |
| 77 | +feat: add OAuth login |
| 78 | +fix(ci): retry flaky upload step |
| 79 | +docs: clarify release setup |
39 | 80 | ``` |
40 | 81 |
|
41 | 82 | ## 🤝 Contributing |
42 | 83 |
|
43 | | -Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub [Issues](https://github.com/liblaf/copier-release/issues) to get stuck in to show us what you're made of. |
44 | | - |
45 | | -[](https://github.com/liblaf/copier-release/pulls) |
| 84 | +Ideas, fixes, and improvements are all welcome. If you want to help refine the template or extend the release flow, open an issue or send a pull request. |
46 | 85 |
|
47 | | -[](https://github.com/liblaf/copier-release/graphs/contributors) |
| 86 | +[](https://github.com/liblaf/copier-release/pulls) |
| 87 | +[](https://github.com/liblaf/copier-release/graphs/contributors) |
48 | 88 |
|
49 | 89 | ## 🔗 More Copier Templates |
50 | 90 |
|
51 | | -<!-- tangerine-start: projects/copier.md --> |
52 | | - |
53 | | -- **[Shared](https://github.com/liblaf/copier-shared)** - ✨ Automated code quality and maintenance for your projects: A Copier template with pre-commit hooks, MegaLinter, and auto-update workflows. |
54 | | -- **[Release](https://github.com/liblaf/copier-release)** - 🚀 Automated release management with Copier and Release Please |
55 | | -- **[Python](https://github.com/liblaf/copier-python)** - 🐍 A modern Copier template for Python projects. Pre-configured with mise, ruff, pytest, mkdocs, and GitHub Actions workflows for seamless development. |
56 | | -- **[Rust](https://github.com/liblaf/copier-rust)** - 🦀 Copier template for Rust projects with cross-compilation, CI/CD, and release automation |
57 | | -- **[TypeScript](https://github.com/liblaf/copier-typescript)** - 🚀 Kickstart your TypeScript project with modern tools like Bun, Biome, and automated CI/CD workflows. |
58 | | -<!-- tangerine-end --> |
| 91 | +- **[Shared](https://github.com/liblaf/copier-shared)** - ✨ Shared automation for code quality, maintenance, and repository hygiene |
| 92 | +- **[Python](https://github.com/liblaf/copier-python)** - 🐍 A modern Python project template with tooling, docs, and CI ready to go |
| 93 | +- **[Rust](https://github.com/liblaf/copier-rust)** - 🦀 A Rust template with cross-compilation, CI, and release automation |
| 94 | +- **[TypeScript](https://github.com/liblaf/copier-typescript)** - 🚀 A TypeScript template built around modern tooling and GitHub automation |
59 | 95 |
|
60 | 96 | --- |
61 | 97 |
|
62 | 98 | #### 📝 License |
63 | 99 |
|
64 | 100 | Copyright © 2024 [liblaf](https://github.com/liblaf). <br /> |
65 | | -This project is [MIT](https://github.com/liblaf/copier-release/blob/main/LICENSE) licensed. |
| 101 | +This project is [MIT](./LICENSE) licensed. |
0 commit comments