Skip to content

Commit

Permalink
Use pub.dev automated publishing (#9)
Browse files Browse the repository at this point in the history
* Use automated publishing in CD

* Fix build badge

* Fix analyzer issues

* Use mobile-tools/pub-release action

* Add contents permission to CD
  • Loading branch information
Albert221 authored Feb 20, 2023
1 parent 98d52a8 commit d9d65b6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
19 changes: 8 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,18 @@ jobs:

runs-on: ubuntu-latest

permissions:
id-token: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: 2.12.0

- name: Download pub.dev credentials
env:
CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
run: |
mkdir -p ~/.pub-cache
echo $CREDENTIALS > ~/.pub-cache/credentials.json
sdk: 2.18.6

- name: Publish
run: dart pub publish -f
- name: Publish and release
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ class FooBarCubit {

[pub-badge]: https://img.shields.io/pub/v/logging_bugfender
[pub-badge-link]: https://pub.dev/packages/logging_bugfender
[build-badge]: https://img.shields.io/github/workflow/status/leancodepl/logging_bugfender/test
[build-badge-link]: https://github.com/leancodepl/logging_bugfender/actions?query=workflow%3A%22test%22
[build-badge]: https://img.shields.io/github/actions/workflow/status/leancodepl/logging_bugfender/test.yml?branch=master
[build-badge-link]: https://github.com/leancodepl/logging_bugfender/actions/workflows/test.yml
[logging]: https://pub.dev/packages/logging
3 changes: 1 addition & 2 deletions lib/src/print_strategy.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import 'package:logging/logging.dart';

import 'logging_bugfender.dart';
import 'package:logging_bugfender/src/logging_bugfender.dart';

/// Defines how [LoggingBugfenderListener] prints log messages.
abstract class PrintStrategy {
Expand Down

0 comments on commit d9d65b6

Please sign in to comment.