File tree 2 files changed +58
-1
lines changed
2 files changed +58
-1
lines changed Original file line number Diff line number Diff line change 13
13
jobs :
14
14
# Check code formatting and static analysis on Ubuntu.
15
15
analyze :
16
- runs-on : ubuntu-latest
16
+ runs-on : ubuntu-20.04
17
17
strategy :
18
18
fail-fast : false
19
19
matrix :
42
42
run : dart pub get
43
43
- name : Run VM tests
44
44
run : dart test --platform vm
45
+
46
+ # release on Github and pub.dev
47
+ publish :
48
+ needs : test
49
+ if : github.repository == 'casbin/dart-casbin' && github.event_name == 'push'
50
+ runs-on : ubuntu-20.04
51
+ steps :
52
+ - uses : actions/checkout@v2
53
+ - uses : cedx/setup-dart@v2
54
+ - uses : actions/setup-node@v2
55
+ with :
56
+ node-version : 14
57
+ - run : npm install -g "@semantic-release/changelog"
58
+ - run : npm install -g "@semantic-release/git"
59
+ - run : npm install -g "pub-semantic-release"
60
+
61
+ - name : Semantic Release
62
+ run : |
63
+ export NODE_PATH="$(npm root -g)"
64
+ npx semantic-release@17
65
+ env :
66
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
67
+
68
+ - name : Publish to pub
69
+ run : dart pub publish --dry-run
70
+
71
+ -
uses :
sakebook/[email protected]
72
+ with :
73
+ package_directory : ${{ matrix.package }}
74
+ credential : ${{ secrets.PUB_CREDENTIALS }}
75
+ flutter_package : true
76
+ skip_test : true
Original file line number Diff line number Diff line change
1
+ {
2
+ "debug" : true ,
3
+ "branches" : [
4
+ " master"
5
+ ],
6
+ "plugins" : [
7
+ " @semantic-release/commit-analyzer" ,
8
+ " @semantic-release/release-notes-generator" ,
9
+ " pub-semantic-release" ,
10
+ [
11
+ " @semantic-release/changelog" ,
12
+ {
13
+ "changelogFile" : " CHANGELOG.md"
14
+ }
15
+ ],
16
+ [
17
+ " @semantic-release/git" ,
18
+ {
19
+ "assets" : [" pubspec.yaml" , " CHANGELOG.md" ],
20
+ "message" : " chore(release): ${nextRelease.version} [skip ci]\n\n ${nextRelease.notes}"
21
+ }
22
+ ],
23
+ " @semantic-release/github"
24
+ ]
25
+ }
You can’t perform that action at this time.
0 commit comments