-
Notifications
You must be signed in to change notification settings - Fork 2
56 lines (46 loc) · 1.6 KB
/
on_release.yml
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
55
56
name: On Release
on:
push:
branches:
- main
jobs:
verify-changed-files:
runs-on: macos-13
outputs:
output1: ${{ steps.changed-files.outputs.modified_files }}
steps:
- uses: actions/checkout@v2
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v23
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
create-tag:
runs-on: macos-latest
needs: [verify-changed-files]
steps:
- uses: actions/checkout@v2
- run: echo ${{needs.verify-changed-files.outputs.output1}}
- name: Is there a change in the unicocheck-ios.podspec? Create tag
if: contains(needs.verify-changed-files.outputs.output1, 'unicocheck-ios.podspec')
run: bash scripts/create_github_tag_and_release.sh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
cocoapods-publish:
runs-on: macos-latest
needs: [verify-changed-files, create-tag]
steps:
- uses: actions/checkout@v2
- run: echo ${{needs.verify-changed-files.outputs.output1}}
- name: Is there a change in the unicocheck-ios.podspec? Publish to CocoaPods
if: contains(needs.verify-changed-files.outputs.output1, 'unicocheck-ios.podspec')
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
run: |
pod trunk push unicocheck-ios.podspec --allow-warnings