Skip to content

fix github action error for updating hugo version #31

fix github action error for updating hugo version

fix github action error for updating hugo version #31

Workflow file for this run

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 }}