-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (35 loc) · 1.25 KB
/
release-kbecli.yml
File metadata and controls
42 lines (35 loc) · 1.25 KB
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
name: Release Kbecli Homebrew Tap
on:
workflow_dispatch:
inputs:
VERSION:
description: "The release version of kbecli"
type: string
required: true
default: ''
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run-name: release homebrew tap version:${{ inputs.VERSION }}
jobs:
update-version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: update kbecli version
id: update-kbecli-version
run: |
bash .github/utils/update_kbecli_version.sh "${{ inputs.VERSION }}"
FILE_CHANGES=`git diff --name-only ${{ github.sha }}`
if [[ ! -z "$FILE_CHANGES" ]]; then
echo $FILE_CHANGES
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git commit -a -m "chore: auto update kbecli version ${{ inputs.VERSION }}"
fi
echo file_changes=$FILE_CHANGES >> $GITHUB_OUTPUT
- name: Push kbecli version changes
uses: ad-m/github-push-action@master
if: ${{ steps.update-kbecli-version.outputs.file_changes }}
with:
github_token: ${{ env.GITHUB_TOKEN }}
branch: ${{ github.ref }}