-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (50 loc) · 1.5 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Release
on:
push:
branches: [main]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install swiftlint
uses: Cyberbeni/install-swift-tool@v2
with:
url: https://github.com/realm/SwiftLint
version: "*"
- name: Run swiftlint
run: swiftlint
- uses: open-turo/action-pre-commit@v1
test:
name: Test
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build package
run: swift build -Xswiftc "-sdk" -Xswiftc "$(xcrun --sdk iphonesimulator --show-sdk-path)" -Xswiftc "-target" -Xswiftc "x86_64-apple-ios15.5-simulator"
- name: Run tests
run: xcodebuild test -scheme TokenTextView -sdk "$(xcrun --sdk iphonesimulator --show-sdk-path)" -target x86_64-apple-ios15.2-simulator -destination "OS=15.2,name=iPhone 13 Pro"
release:
needs:
- lint
- test
name: Release
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install CocoaPods
run: |
sudo gem install cocoapods
- name: Install semantic versioning for CocoaPods
run: |
npm install semantic-release-cocoapods -D
- name: Release
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}