Skip to content

automatically merge to release branch when version number is incremen… #3

automatically merge to release branch when version number is incremen…

automatically merge to release branch when version number is incremen… #3

Workflow file for this run

on:
push:
branches:
- main
name: Update release branch if version incremented
jobs:
"Check version":

Check failure on line 8 in .github/workflows/release.yml

View workflow run for this annotation

GitHub Actions / Update release branch if version incremented

Invalid workflow file

The workflow is not valid. .github/workflows/release.yml (Line: 8, Col: 3): The identifier 'Check version' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters. .github/workflows/release.yml (Line: 27, Col: 3): The identifier 'Push release branch' is invalid. IDs may only contain alphanumeric characters, '_', and '-'. IDs must start with a letter or '_' and and must be less than 100 characters.
runs-on: ubuntu-latest
outputs:
output1: ${{ steps.bumped.outputs.test }}
steps:
- uses: actions/checkout@v4
- name: Check if version bumped in package.json
id: bumped
run: '
if [
"$(git blame -l package.json | grep "\"version\":" | cut -d " " -f 1)"
=
"$(git rev-parse HEAD)"
]; then
echo 0 > $GITHUB_OUTPUT
else
echo 1 > $GITHUB_OUTPUT
fi
'
"Push release branch":
needs: "Check version"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Push release branch
env:
OUTPUT: ${{needs.bumped.outputs.output1}}
run: '
[ "$OUTPUT" = "0" ] &&
git branch -f release &&
git push -f origin release
'