Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Enabling automated releases. #16

Closed

Conversation

patrickhammond
Copy link
Collaborator

@patrickhammond patrickhammond commented Dec 18, 2023

Uses https://github.com/googleapis/release-please for automated changelog updates, pubspec updates, GitHub releases, etc.

Overview:

  • Push to main triggers the release action which will update the version in pubspec.yaml, refresh CHANGELOG.md, and create a new release PR for review.
  • Approving the release PR will automatically create a new release tag and create a Github release.
  • When the automatic tag creation happens, the publish action will kick off to send everything to pub.dev.

@cjbell Setup is needed on your side before merging this PR to make everything work.

Github repository:

  • Settings -> Actions -> General: check "Allow GitHub Actions to create and approve pull requests".
  • Settings -> Environments: Create a new environment named pub.dev
    • Select "Selected branches and tags" from "Deployment branches and tags", choose "Add deployment branch or tag rule", choose "Ref type: Tag", and enter v*.
  • Settings -> Secrets and variables -> Actions: Add an environment secret named RELEASE_PERSONAL_ACCESS_TOKEN with a Personal Access Token (https://github.com/settings/tokens). The PAT used will be the username that shows up in the automated release PR.

pub.dev:

  • (Already complete...sharing for transparency) Go to https://pub.dev/packages/knock_flutter/admin and enable automated publishing from GitHub Actions. Repository is: knocklabs/knock-flutter, tag pattern is: v{{version}}, check Require GitHub Actions environment and set the environment value to be pub.dev.

Because we're adding this to an existing history, we need to be explicit in the next line for release-please about what version we want to use (only need to do this once, it'll figure it out from here on out) and declare a git SHA in the bootstrap file (again, it'll use this once and never again).

Release-As: 0.1.2

Copy link

linear bot commented Dec 18, 2023

Copy link

Coverage Report

Coverage after merging patrick-kno-4829-automated-publishing-to-pubdev into main will be
47.28%
Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
lib/src
   api_client.dart74.58%100%100%74.58%143, 21, 33, 35, 37, 39–40, 42–43, 46, 48, 51–54
   feed_client.dart0%100%100%0%100, 102–104, 106, 112–114, 116–117, 123–125, 127–128, 134–135, 139, 141, 144–146, 149, 151, 158, 160–161, 163–164, 166–167, 169–170, 172–173, 175, 177–178, 183–184, 186–187, 190–191, 193, 195, 197–199, 206, 212–213, 217, 219–221, 223–224, 226–227, 230–231, 236–237, 242, 245, 249–251, 254–255, 261–262, 265, 270–271, 277–278, 280–282, 286–287, 290, 294, 297–298, 300–302, 306–307, 310, 314, 317–318, 320–322, 326–327, 330, 334, 337–338, 340–342, 346–347, 350, 354, 357–358, 360–362, 364–365, 370–371, 374, 378, 381–382, 384–386, 390–391, 394, 398, 401–402, 404–406, 41, 410, 413–414, 416–420, 423–424, 426–427, 431, 434–435, 437–441, 444–445, 447–448, 452, 455–456, 458–459, 46, 460–462, 465–466, 468–469, 47, 473, 476, 480–482, 487–488, 49, 491–493, 495–499, 50, 501–502, 504, 51, 510–512, 520–529, 533–539, 54, 540, 547–549, 57–58, 60–61, 86, 88, 90–92, 95–97
   knock.dart51.28%100%100%51.28%101, 104–105, 108, 112–113, 117–119, 122, 124, 62–64, 66, 93, 96–98
   preferences_client.dart5.26%100%100%5.26%14, 22, 24–26, 28, 30, 33–35, 37–38, 41–44, 47–48
   user_client.dart0%100%100%0%11, 13–15, 17–18, 21, 29–31, 34–35, 38–39, 42–43, 46–47, 50–52, 55–56, 59–61, 63–64, 67, 7, 71–73, 76–77
lib/src/model
   api_response.dart14.29%100%100%14.29%20–22, 25–27
   channel.dart100%100%100%100%
   feed.dart100%100%100%100%
   feed_options.dart100%100%100%100%
   preferences.dart100%100%100%100%
   recipient.dart100%100%100%100%
   user.dart91.30%100%100%91.30%66–67
   feed_extensions.dart100%100%100%100%
   feed_response.dart100%100%100%100%
   knock_object.dart100%100%100%100%
lib/src/util
   retry.dart100%100%100%100%
   date_time.dart100%100%100%100%
   arguments.dart0%100%100%0%7

@patrickhammond patrickhammond marked this pull request as ready for review December 18, 2023 19:52
@cjbell cjbell closed this Feb 5, 2024
@cjbell cjbell deleted the patrick-kno-4829-automated-publishing-to-pubdev branch February 5, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants