-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (42 loc) · 1.41 KB
/
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
name: Release an update to Cocoapods
on:
push:
# types: [ closed ]
branches: [ main ]
jobs:
release:
# if: github.event.pull_request.merged == true
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Determine version number
id: version_bump
uses: mathieudutour/[email protected]
with:
dry_run: true
tag_prefix: ''
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Sed new version in Podspec
run: sed -i "" -e 's|<LIB_VERSION>|${{ steps.version_bump.outputs.new_tag }}|g' RFIBAN-Helper.podspec
- name: Commit updated Podspec
uses: swinton/[email protected]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
RFIBAN-Helper.podspec
commit-message: '[Auto] update Podspec with version ${{ steps.version_bump.outputs.new_tag }}'
- name: Actualy tag latest commit
uses: mathieudutour/[email protected]
with:
tag_prefix: ''
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Push update to Cocoapods when merging to main
run: exec pod trunk push RFIBAN-Helper.podspec --allow-warnings
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}