Skip to content

Publish packages automatically after merge #394

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

Merged
merged 6 commits into from
May 25, 2022

Conversation

HakkyuKim
Copy link
Contributor

@HakkyuKim HakkyuKim commented May 20, 2022

Closes #378.

Summary

For pull requests events:

  1. Checks for packages where version field in pubspec.yaml changed.
  2. Run pub publish --dry-run to make CI fail on any errors or warnings. For example, missing a corresponding version entry in CHANGELOG.md.

For push events on master branch:

  1. Hold off completing release workflow until all other workflows are finished.
  2. Run pub publish --dry-run again just in case.
  3. Publish the changed packages identified in the pushed PR.

Prerequisite

The content of the credential.json, which is created when running dart pub login, must be added to Github repository secrets with name "PUB_CREDENTIALS".

Limitation

New packages must be published manually because pub.dev current doesn't support publishing a new package directly to a verified publisher, See https://dart.dev/tools/pub/publishing#publishing.

TODO

HakkyuKim added 2 commits May 20, 2022 16:36
- Correct repository url.
- Add missing copyright notice.
@github-actions github-actions bot added the tools label May 20, 2022
@HakkyuKim HakkyuKim force-pushed the publish-package-command branch from 7f66da6 to 2c23fd9 Compare May 23, 2022 05:10
@github-actions github-actions bot added p: network_info_plus needs-publishing The package should be published after merge labels May 23, 2022
@HakkyuKim HakkyuKim force-pushed the publish-package-command branch from 79c0d06 to 29c3806 Compare May 23, 2022 05:56
@github-actions github-actions bot removed p: network_info_plus needs-publishing The package should be published after merge labels May 23, 2022
@HakkyuKim HakkyuKim force-pushed the publish-package-command branch from 29c3806 to 1d62693 Compare May 23, 2022 05:57
@HakkyuKim
Copy link
Contributor Author

HakkyuKim commented May 23, 2022

We can put off setting PUB_CREDENTIALS to Github secrets and first see if the workflow runs correctly on the master branch, if it does, we can rerun the job after adding PUB_CREDENTIALS. I see google_maps_flutter_tizen isn't published for 0.1.2, shall I try with this?

  1. Merge this PR.
  2. Create a new PR that publishes google_maps_flutter_tizen-0.1.2.
  3. Merge the PR and see if the only error is "PUB_CREDENTIALS not found".
  4. Add PUB_CREDENTIALS and rerun the release workflow.

@HakkyuKim HakkyuKim marked this pull request as ready for review May 23, 2022 06:06
@HakkyuKim
Copy link
Contributor Author

The flutter team allowed neutral conclusion due to Cirrus CI, it shouldn't be a problem on our side.

Copy link
Member

@swift-kim swift-kim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise overall looks good. Thank you!

@swift-kim
Copy link
Member

@HakkyuKim You can test the push event with this PR: #392

@HakkyuKim
Copy link
Contributor Author

@swift-kim
Okay, I'll merge #392 after this PR is merged.

@HakkyuKim HakkyuKim force-pushed the publish-package-command branch from eb6ea30 to e3ea847 Compare May 25, 2022 01:42
@HakkyuKim HakkyuKim merged commit de7b89d into flutter-tizen:master May 25, 2022
@swift-kim
Copy link
Member

https://github.com/flutter-tizen/plugins/runs/6586016243

The publication was successful after updating PUB_CREDENTIALS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Publish packages automatically after merge
2 participants