You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This repository provides a powerful and streamlined set of GitHub Actions workflows designed to automate the entire lifecycle of your Dart and Flutter packages—from version bumping and changelog generation to publishing on pub.dev and deploying examples to GitHub Pages.
4
+
5
+
---
6
+
7
+
## 🚀 Core Features
8
+
9
+
-**Automated Version Bumping:** Automatically update `CHANGELOG.md`, `README.md`, and other files when you're ready to release.
10
+
-**Git Tagging:** Automatically create and push Git tags for new versions.
11
+
-**Flexible Publishing Triggers:** Publish packages automatically via special commit messages or by creating a release in the GitHub UI.
12
+
-**Example App Deployment:** An optional workflow to build and deploy a Flutter web example to GitHub Pages.
2
13
3
14
## Workflows
4
15
5
-
**This repository contains GitHub Actions workflows that simplify the management of your pub.dev packages:**
16
+
This project contains three key GitHub Actions workflows.
17
+
18
+
### 1. `process-package.yml`
19
+
20
+
This is the primary workflow for managing releases directly from your commit messages. It triggers on every push to your `main` branch.
21
+
22
+
-**Standard Commits:** For any normal commit message, the workflow does nothing.
23
+
-**Prepare a Release (`+`):** If your commit message starts with a single plus sign (e.g., `+Added new feature`), the workflow will:
24
+
- Run `dart format` and `dart fix --apply`.
25
+
- Update your `CHANGELOG.md` with the commit message.
26
+
- Generate a standardized `README.md` from a central template.
27
+
- Commit these automated changes with the message `ci: bump version to v[version]`.
28
+
- Create and push a Git tag for the new version.
29
+
-**Prepare and Publish (`++`):** If your commit message starts with two plus signs (e.g., `++Major performance improvements`), the workflow will do **everything above** and then automatically **publish the package to pub.dev** if properly configured. See https://dart.dev/tools/pub/automated-publishing.
30
+
31
+
### 2. `publish.yml`
32
+
33
+
This workflow provides a manual trigger for publishing. It activates **only** when you create a new release in the GitHub UI. This is perfect for when you want to review changes on the `main` branch before deciding to publish.
6
34
7
-
- The `prepare.yaml` workflow triggers on every push to the main branch. It automatically updates the CHANGELOG.md, formats the Dart code, and applies Dart fixes with each push.
8
-
- The `publish.yaml` workflow activates upon the creation of a new release, automatically handling the package's publication to pub.dev.
35
+
### 3. `deploy-example.yml` (Optional)
9
36
10
-
## Setup Instructions
37
+
If your project contains a Flutter web example in a `hosted_example` directory, this workflow will automatically build it and deploy it to GitHub Pages on every push to the `main` branch. This is great for providing live demos of your package.
11
38
12
-
**1. Navigate to your project:**
39
+
---
40
+
41
+
## 🛠️ Setup Instructions
42
+
43
+
Setting up these workflows in your own package repository is simple.
44
+
45
+
**1. Navigate to Your Project's Root Directory**
46
+
47
+
Open your terminal and `cd` into the root of your Dart or Flutter package.
13
48
14
49
```zsh
15
-
cd your_project
50
+
cd/path/to/your_project
16
51
```
17
52
18
-
**2. Clone this repo into a `.github/` folder:**
53
+
**2. Clone this Workflow Repository**
54
+
55
+
Clone this repository directly into a `.github` folder. This will create `.github/workflows` and `.github/scripts` for you.
0 commit comments