-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
41 lines (39 loc) · 1.28 KB
/
CI-bump-build-number.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
name: CI - Update Build Number
on:
workflow_dispatch:
jobs:
upadate-build-number:
name: Update Build Number
runs-on: [self-hosted, macOS]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Bump Build Number
run: |
xcrun agvtool next-version -all
APP_BUILD=$(xcrun agvtool vers -terse)
echo "APP_BUILD=$APP_BUILD" >> $GITHUB_ENV
- name: Commit Changes
env:
APP_BUILD: ${{ env.APP_BUILD }}
run: |
git add .
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "bump build number to $APP_BUILD"
- name: Push Changes
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: temp/bump-build-number
force: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
env:
APP_BUILD: ${{ env.APP_BUILD }}
with:
branch: temp/bump-build-number
delete-branch: true
base: main
title: Bump Build Number to ${{ env.APP_BUILD }}
body: Automatically bump build number of all targets to ${{ env.APP_BUILD }}