Skip to content

Commit ff09ef2

Browse files
Merge pull request #10 from mindbox-moscow/release/0.1.0
Initial release
2 parents 069a682 + 9feb2ef commit ff09ef2

File tree

3 files changed

+84
-1
lines changed

3 files changed

+84
-1
lines changed

.github/workflows/publish.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
10+
flutter_test:
11+
name: ${{ matrix.package }} running analyze and tests
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
package:
16+
- 'mindbox'
17+
- 'mindbox_android'
18+
- 'mindbox_ios'
19+
- 'mindbox_platform_interface'
20+
fail-fast: false
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions/setup-java@v1
24+
with:
25+
java-version: "12.x"
26+
- uses: subosito/flutter-action@v1
27+
with:
28+
channel: "stable"
29+
- run: cd ${{ matrix.package }} && flutter pub get
30+
- run: cd ${{ matrix.package }} && flutter analyze
31+
- run: cd ${{ matrix.package }} && flutter test
32+
33+
publish:
34+
needs: [flutter_test]
35+
timeout-minutes: 4
36+
runs-on: ubuntu-latest
37+
name: ${{ matrix.package }} publishing
38+
strategy:
39+
matrix:
40+
package:
41+
- 'mindbox'
42+
- 'mindbox_android'
43+
- 'mindbox_ios'
44+
- 'mindbox_platform_interface'
45+
fail-fast: false
46+
47+
steps:
48+
- uses: actions/[email protected]
49+
with:
50+
fetch-depth: 2
51+
52+
- name: Check package Pubspec
53+
id: pubspec
54+
run: |
55+
set +e
56+
git diff-tree --no-commit-id --name-only -r ${{ github.sha }} | grep '${{ matrix.package }}/pubspec.yaml'
57+
echo ::set-output name=changed::$?
58+
set -e
59+
- name: Extract package version
60+
if: steps.pubspec.outputs.changed == 0
61+
run: |
62+
cd ${{ matrix.package }}
63+
echo "VERSION=$(awk '{if ($1 ~ /^version:/) print $2}' pubspec.yaml)" >> $GITHUB_ENV
64+
- uses: sakebook/[email protected]
65+
if: steps.pubspec.outputs.changed == 0
66+
with:
67+
package_directory: ${{ matrix.package }}
68+
credential: ${{ secrets.PUB_CREDENTIALS }}
69+
flutter_package: true
70+
skip_test: true
71+
- name: Create Release
72+
# if: steps.pubspec.outputs.changed == 0
73+
id: create_release
74+
uses: actions/[email protected]
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
tag_name: ${{ matrix.package }}-v${{ env.VERSION }}
79+
release_name: ${{ matrix.package }} v${{ env.VERSION }}
80+
draft: false
81+
prerelease: false

mindbox_ios/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# mindbox_ios
22

3-
iOs implementation of [`mindbox`][1] plugin.
3+
The iOS implementation of [`mindbox`][1] plugin.
44

55
[1]: ../mindbox

mindbox_platform_interface/lib/src/mindbox_platform.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ abstract class MindboxPlatform {
1515

1616
/// Platform-specific plugins should set this with their own platform-specific
1717
/// class that extends [MindboxPlatform] when they register themselves.
18+
// ignore: unnecessary_getters_setters
1819
static set instance(MindboxPlatform instance) {
1920
_instance = instance;
2021
}
2122

2223
/// The instance of [MindboxPlatform] to use.
2324
///
2425
/// Must be set before accessing.
26+
// ignore: unnecessary_getters_setters
2527
static MindboxPlatform get instance => _instance;
2628

2729
/// Initializes the SDK for further work

0 commit comments

Comments
 (0)