forked from jayeshakbari/wire-ios-protos
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.77 KB
/
createBumpPR.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
name: Create bump PR v0.1.3
on:
workflow_dispatch:
repository_dispatch:
types: [newRelease]
jobs:
create-bump-pr:
runs-on: macos-10.15
steps:
- name: Event Information
run: |
echo "Event '${{ github.event.action }}' received from '${{ github.event.client_payload.repository }}'"
- name: checkout
uses: actions/checkout@v2
- name: create branch
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
BRANCH=chore/bump_$(date +%Y-%m-%d-%H%M%S)
git config --global user.email "[email protected]"
echo "ℹ️ create branch: $BRANCH"
git branch $BRANCH
git checkout $BRANCH
# process Cartfile
curl --silent https://raw.githubusercontent.com/wireapp/wire-ios-shared-resources/master/Scripts/updateCatfile.swift --output updateCarfile.swift
chmod +x updateCarfile.swift
swift updateCarfile.swift ${{ secrets.DISPATCH_SECRET }} ./Cartfile
swift updateCarfile.swift ${{ secrets.DISPATCH_SECRET }} ./Cartfile.private
rm updateCarfile.swift
# Carthage update
### Hack: carthage update may never done if framework dependency versions does not match.
### limit the maximum amount of cpu time to 60 sec to stop the update after timeout
ulimit -t 60; carthage update --no-build
# Create bump PR
git add .
git commit -m"bump components"
git push --set-upstream origin $BRANCH
echo "ℹ️ open bump PR"
gh pr create --title "chore: bump components" --body "Bump framework(s) version for: ${{ github.event.client_payload.repository }}"