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: add release/publish workflows #155

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

falconandy
Copy link
Contributor

Added 2 workflows:

  1. release (manual) - bumps version, creates/pushes a commit/tag.
  2. publish (auto-triggered on push) - publishes new version to pub.dev

release workflow:

A deploy key (public part) should be added to the repo with write access. Private part of the key should be added as a repo secret DEPLOY_KEY.

publish workflow:
https://dart.dev/tools/pub/automated-publishing#publishing-packages-using-github-actions

Need to setup Publishing from GitHub Actions in package settings:
image

I use latest Flutter/Dart versions: 3.13.3/3.1.1. example/pubspec.lock was updated by flutter pub get command (also cupertino_icons should be bumped to ^1.0.6 in example/pubspec.yaml)

I think the example should be updated to recent Flutter/Dart versions. It doesn't work for me (may depend on Android Studio version in addition to Flutter/Dart versions).

flutter analyze command outputs 12 info messages and 2 warnings. I fixed the 2 warnings. For now I use command flutter analyze --no-fatal-infos to ignore info messages. --no-fatal-infos flag can be removed after we update the example.

Info messages:

Analyzing example...                                                    

   info • The import of 'package:flutter/foundation.dart' is unnecessary because all of the used elements are also provided by the import of 'package:flutter/material.dart' • lib/app_state.dart:2:8 • unnecessary_import
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/deviceid_sessionid.dart:16:66 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/deviceid_sessionid.dart:31:67 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/event_form.dart:25:58 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/flush_thresholds_form.dart:42:68 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/group_form.dart:32:68 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/group_identify_form.dart:44:67 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/identify_form.dart:38:61 • deprecated_member_use
   info • 'bodyText1' is deprecated and shouldn't be used. Use bodyLarge instead. This feature was deprecated after v3.1.0-0.0.pre • lib/my_app.dart:115:67 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/revenue_form.dart:41:60 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/user_id_form.dart:22:68 • deprecated_member_use
   info • 'headline5' is deprecated and shouldn't be used. Use headlineSmall instead. This feature was deprecated after v3.1.0-0.0.pre • lib/user_id_form.dart:30:60 • deprecated_member_use

@justin-fiedler justin-fiedler merged commit 42d09c4 into main Nov 8, 2023
@justin-fiedler justin-fiedler deleted the AMP-77043-automate-release branch November 8, 2023 00:27
@justin-fiedler
Copy link
Contributor

Thanks @falconandy. The example was working for me locally.

What platform did you try? iOS/Android/Web?

My flutter --version is

Flutter 3.3.8 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 52b3dc25f6 (12 months ago) • 2022-11-09 12:09:26 +0800
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0

justin-fiedler pushed a commit that referenced this pull request Nov 8, 2023
## [3.16.1](v3.16.0...v3.16.1) (2023-11-08)

### Bug Fixes

* add release/publish workflows ([#155](#155)) ([42d09c4](42d09c4))
Copy link

github-actions bot commented Nov 8, 2023

🎉 This PR is included in version 3.16.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@falconandy
Copy link
Contributor Author

@justin-fiedler

I tried on Ubuntu + Android Emulator.

Flutter 3.13.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2524052335 (9 weeks ago) • 2023-09-06 14:32:31 -0700
Engine • revision b8d35810e9
Tools • Dart 3.1.1 • DevTools 2.25.0

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.

2 participants