Skip to content

Commit

Permalink
Automate pub.dev publishing (#65)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfccp authored Oct 29, 2023
1 parent d27eafd commit fd4c590
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Publish to pub.dev

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'

jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.0+1

- Automate pub.dev publishing with `GitHub Actions`

## 3.1.0

- Provide `.periodic` constructor (#45)
Expand Down
22 changes: 10 additions & 12 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
At some point this should be automated, but for now to make a new release you
should follow this checklist:

- [ ] Update the version in `pubspec.yaml` (use X.Y.Z)
- [ ] Add an entry to `CHANGELOG.md` (use X.Y.Z)
- [ ] Commit and push the changes creating a PR
- [ ] Define what will be the next version of the package
- This package uses [semantic versioning](http://semver.org/), so take it
into account when releasing a new version
- [ ] Update the version in `pubspec.yaml`
- [ ] Add an entry to `CHANGELOG.md` describing the relevant changes
- [ ] Commit and push the changes to a new branch and open a PR
- [ ] Merge the PR and pull the changes
- [ ] Run `dart pub publish -n` and make sure there are no warnings and the
version is correct
- [ ] Tag the release with `tag -a vX.Y.Z` and use the contents added to
- [ ] Tag the release with `tag -a v<version>` and use the contents added to
`CHANGELOG.md` as the message
- Example: for the 3.0.0 version, tag the release as `v3.0.0`
- [ ] Push the tag
- Once the tag is pushed, GitHub Actions are going to automatically release
it to pub.dev
- [ ] Create a GitHub release for the tag using the tag message as release
notes
- [ ] If there is a milestone called `vX.Y.Z`, close it. Otherwise if there is
a milestone `next`, rename it to `vX.Y.Z` and close it. Otherwise create
a new milestone and assign all the issues and PRs that were added for this
version
- [ ] Create a new `next` milestone
- [ ] Publish the package via `dart pub publish`

## Git Hooks

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# pausable\_timer [![Sponsor](https://img.shields.io/badge/-Sponsor-555555?style=flat-square)](https://github.com/llucax/llucax/blob/main/sponsoring-platforms.md)[![GitHub Sponsors](https://img.shields.io/badge/--ea4aaa?logo=github&style=flat-square)](https://github.com/sponsors/llucax)[![Liberapay](https://img.shields.io/badge/--f6c915?logo=liberapay&logoColor=black&style=flat-square)](https://liberapay.com/llucax/donate)[![Paypal](https://img.shields.io/badge/--0070ba?logo=paypal&style=flat-square)](https://www.paypal.com/donate?hosted_button_id=UZRR3REUC4SY2)[![Buy Me A Coffee](https://img.shields.io/badge/--ff813f?logo=buy-me-a-coffee&logoColor=white&style=flat-square)](https://www.buymeacoffee.com/llucax)[![Patreon](https://img.shields.io/badge/--f96854?logo=patreon&logoColor=white&style=flat-square)](https://www.patreon.com/llucax)[![Flattr](https://img.shields.io/badge/--6bc76b?logo=flattr&logoColor=white&style=flat-square)](https://flattr.com/@llucax)
# pausable\_timer

[![CI](https://github.com/llucax/pausable_timer/workflows/CI/badge.svg)](https://github.com/llucax/pausable_timer/actions?query=branch%3Amain+workflow%3ACI+)
[![Pub Score](https://github.com/llucax/pausable_timer/workflows/Pub%20Score/badge.svg)](https://github.com/llucax/pausable_timer/actions?query=branch%3Amain+workflow%3A%22Pub+Score%22+)
Expand All @@ -8,6 +8,8 @@
[![pub points](https://img.shields.io/pub/points/pausable_timer)](https://pub.dev/packages/pausable_timer/score)
[![popularity](https://img.shields.io/pub/popularity/pausable_timer)](https://pub.dev/packages/pausable_timer/score)
[![likes](https://img.shields.io/pub/likes/pausable_timer)](https://pub.dev/packages/pausable_timer/score)
[![Sponsor (llucax)](https://img.shields.io/badge/-Sponsor-555555?style=flat-square)](https://github.com/llucax/llucax/blob/main/sponsoring-platforms.md)[![GitHub Sponsors](https://img.shields.io/badge/--ea4aaa?logo=github&style=flat-square)](https://github.com/sponsors/llucax)[![Liberapay](https://img.shields.io/badge/--f6c915?logo=liberapay&logoColor=black&style=flat-square)](https://liberapay.com/llucax/donate)[![Paypal](https://img.shields.io/badge/--0070ba?logo=paypal&style=flat-square)](https://www.paypal.com/donate?hosted_button_id=UZRR3REUC4SY2)[![Buy Me A Coffee](https://img.shields.io/badge/--ff813f?logo=buy-me-a-coffee&logoColor=white&style=flat-square)](https://www.buymeacoffee.com/llucax)[![Patreon](https://img.shields.io/badge/--f96854?logo=patreon&logoColor=white&style=flat-square)](https://www.patreon.com/llucax)[![Flattr](https://img.shields.io/badge/--6bc76b?logo=flattr&logoColor=white&style=flat-square)](https://flattr.com/@llucax)
[![Sponsor (mateusfccp)](https://img.shields.io/badge/-Sponsor-555555?style=flat-square)](https://github.com/sponsors/mateusfccp)[![GitHub Sponsors](https://img.shields.io/badge/--ea4aaa?logo=github&style=flat-square)](https://github.com/sponsors/mateusfccp)

A [Dart](https://dart.dev/)
[timer](https://api.dart.dev/stable/dart-async/Timer/Timer.html) that can be
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ funding:
- https://github.com/sponsors/mateusfccp
- https://github.com/llucax/llucax/blob/main/sponsoring-platforms.md

version: 3.1.0
version: 3.1.0+1

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down

0 comments on commit fd4c590

Please sign in to comment.