-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.08 KB
/
versionup.yaml
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
name: Version Up
on:
push:
branches:
- 'release/v[0-9]+.[0-9]+.[0-9]**'
jobs:
versionup:
runs-on: ubuntu-latest
steps:
- name: Get branches
id: vars
run: |
echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
echo "tag=${GITHUB_REF##**/v}" >> $GITHUB_OUTPUT
- name: Checkout
uses: actions/checkout@v4
- name: Initialize
shell: bash
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
- name: Version up
id: updating_version
run:
(bash ./.bin/update_version.sh ${{ steps.vars.outputs.tag }} && git commit -a -m "update version to ${{ steps.vars.outputs.tag }}, ready to publish v${{ steps.vars.outputs.tag }}") || true
- name: Push branch
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.vars.outputs.branch }}