Skip to content

Commit 86a7b72

Browse files
authored
ci: add release step to workflow (#7)
1 parent 79a9820 commit 86a7b72

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

.circleci/config.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,28 @@ jobs:
3636
name: Fastlane test
3737
command: bundle exec fastlane mac tests
3838

39+
release:
40+
<<: *default-executor
41+
42+
steps:
43+
- checkout
44+
- ruby/install-deps
45+
- run:
46+
name: Publish new version to cocoapods trunk
47+
command: bundle exec fastlane ios release
48+
3949

4050
workflows:
41-
test-ios:
51+
build-test-deploy:
4252
jobs:
4353
- build-test-ios
44-
test-macos:
45-
jobs:
4654
- build-test-macos
55+
- release:
56+
filters:
57+
tags:
58+
only: /^v.*/
59+
branches:
60+
ignore: /.*/
61+
requires:
62+
- build-test-ios
63+
- build-test-macos

fastlane/Fastfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
platform :ios do
23
before_all do
34
setup_circle_ci
@@ -14,6 +15,15 @@ platform :ios do
1415
device: "iPhone 14",
1516
)
1617
end
18+
19+
desc "Publish to Cocoapods whenever a new version tag is created"
20+
lane :release do
21+
# publish to Cocoapods
22+
# pod_push(
23+
# use_bundle_exec: true,
24+
# path: "AmplifyUtilsNotifications.podspec",
25+
# )
26+
end
1727
end
1828

1929
platform :mac do

fastlane/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
2323

2424
Run all the tests on iOS
2525

26+
### ios release
27+
28+
```sh
29+
[bundle exec] fastlane ios release
30+
```
31+
32+
Publish to Cocoapods whenever a new version tag is created
33+
2634
----
2735

2836

0 commit comments

Comments
 (0)