Skip to content

Commit 01a0393

Browse files
committed
build(ci): releasing with rultor
1 parent 67731f5 commit 01a0393

File tree

2 files changed

+24
-7
lines changed

2 files changed

+24
-7
lines changed

.rultor.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,26 @@ docker:
33
as_root: true
44
architect:
55
- rafamizes
6+
assets:
7+
credentials.json: rafamizes/secret#assets/publishing/flutter/credentials.json
68
merge:
7-
script:
8-
- flutter clean
9-
- flutter pub get
10-
- flutter test --no-pub
11-
- flutter pub publish --dry-run
129
squash: true
10+
rebase: true
11+
script: |
12+
flutter clean
13+
flutter pub get
14+
flutter test --no-pub
15+
flutter pub publish --dry-run
16+
release:
17+
# updates pubspec.yaml's version attribute to $tag;
18+
# in CHANGELOG, places section '[$tag] - YYYY-mm-dd' under [Unreleaded];
19+
# commits the $tag version and publishes to pub.dev;
20+
# Rultor tags the lastest commit as $tag and push the new tag to the
21+
# repository.
22+
script: |-
23+
sed -i "s/^\(version:\).*/\1 $tag/" pubspec.yaml
24+
sed -i "/\[Unreleased\]/a\\\n## [$tag] - $(date '+%F')" CHANGELOG.md
25+
git commit -am "version $tag"
26+
mkdir -p ~/.pub-cache
27+
mv ../credentials.json ~/.pub-cache/credentials.json
28+
flutter pub publish -f

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8-
### Added
9-
- read-only master branch with [rultor](http://www.rultor.com/)
8+
### Changed
9+
- read-only master branch with [rultor](http://www.rultor.com/).
10+
- automate releasing with rultor.
1011

1112
## [0.2.5+2] - 2021-04-29
1213
### Fixed

0 commit comments

Comments
 (0)