CI - Update Build Number #45
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "action@github.com" | |
git config --local user.name "GitHub Action" | |
git commit -m "bump build number to $APP_BUILD" | |
- name: Push Changes | |
uses: ad-m/github-push-action@v0.6.0 | |
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 }} |