This document describes the automated release process for mesh_gradient.
-
GitHub Actions Setup (one-time setup)
- Go to pub.dev/packages/mesh_gradient/admin
- Navigate to "Automated publishing"
- Follow instructions to link your GitHub repository
- This sets up OIDC authentication (no tokens needed!)
-
Install Melos (optional, script will install if needed)
dart pub global activate melos
Run the release script:
bash release.shThe script will:
- Check for uncommitted changes
- Prompt for version bump type (patch/minor/major/custom)
- Ask for changelog description
- Update
pubspec.yamlandCHANGELOG.md - Commit changes and create a git tag
- Show next steps
Then push to GitHub:
git push && git push --tagsGitHub Actions will automatically publish to pub.dev when the tag is pushed.
If you prefer manual control:
-
Update version in
pubspec.yamlversion: 1.3.9
-
Update CHANGELOG.md
## 1.3.9 (2025-10-05) Description of changes -
Commit and tag
git add pubspec.yaml CHANGELOG.md git commit -m "chore(release): 1.3.9" git tag v1.3.9 git push && git push --tags
-
Monitor GitHub Actions
- Go to your repository's Actions tab
- Watch the "Publish to pub.dev" workflow
- Verify publication at pub.dev
Follow semantic versioning:
- Patch (1.3.8 → 1.3.9): Bug fixes, minor improvements
- Minor (1.3.8 → 1.4.0): New features, backward-compatible
- Major (1.3.8 → 2.0.0): Breaking changes
If the script fails, you can rollback:
git reset --hard HEAD~1
git tag -d vX.X.X # delete the tag- Check the Actions tab for error logs
- Verify pub.dev automated publishing is configured
- Ensure the tag format is correct (
vX.X.X) - Check that
pubspec.yamlversion matches the tag
Test the package before releasing:
dart pub publish --dry-run- Runs on every push and PR
- Analyzes code, checks formatting, runs tests
- Must pass before merging
- Triggers on version tags (
v*.*.*) - Publishes to pub.dev automatically
- Uses OIDC authentication (secure, no tokens)
-
Always test before releasing
flutter test flutter analyze -
Write meaningful changelog entries
- Describe what changed and why
- Mention breaking changes clearly
- Reference issue numbers if applicable
-
Keep commits clean
- One version bump per commit
- Use conventional commit format
- Don't mix feature changes with version bumps
-
Review before pushing tags
- Tags trigger automatic publishing
- Once published, versions are immutable
- Review with
git showbefore pushing
# automated release
bash release.sh
# manual version bump
melos version patch --yes
melos version minor --yes
melos version major --yes
# publish locally (not recommended)
dart pub publish --dry-run # test first
dart pub publish # requires manual auth