forked from jayeshakbari/wire-ios-protos
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.83 KB
/
bumpVersion.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
name: Bump version
on:
workflow_dispatch:
push:
branches:
- develop
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: guard for wire bot commit
if: ${{ github.event.head_commit.author.email == '[email protected]' || contains(github.event.head_commit.message, '[skip release]')}}
run: |
echo "exit for wire bot commit or skip release"
exit 1
- name: Bump version and push tag, dry run to get the next tag
uses: wireapp/[email protected]
id: dry_run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: develop
DEFAULT_BUMP: patch
DRY_RUN: true
VERBOSE: true
- name: update version.xcconfig
run: |
echo "new tag: '${{steps.dry_run.outputs.new_tag}}'"
echo "tag: '${{steps.dry_run.outputs.tag}}'"
# process version.xcconfig
curl --silent https://raw.githubusercontent.com/wireapp/wire-ios-shared-resources/master/Scripts/updateVersionXcconfig.swift --output updateVersionXcconfig.swift
chmod +x updateVersionXcconfig.swift
swift updateVersionXcconfig.swift ./Resources/Configurations/version.xcconfig ${{steps.dry_run.outputs.new_tag}}
rm updateVersionXcconfig.swift
git config --global user.email "[email protected]"
git config --global user.name "Github action - Bump version"
git add .
git commit -m"[skip ci] update version.xcconfig for '${{steps.dry_run.outputs.new_tag}}'" || true
git push || true
- name: Bump version and push tag, after version.xcconfig is updated
uses: wireapp/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_BRANCHES: develop
DEFAULT_BUMP: patch