Skip to content

non-release

non-release #90

Workflow file for this run

name: Release Studio
on:
push:
# branches: main
jobs:
check-for-release:
runs-on: ubuntu-latest
# outputs:
# status: ${{ join(steps.*.conclusion) }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: check commit name
id: vars
run: |
COMMIT_MSG="${{ github.event.head_commit.message }}"
COMMIT_TITLE="${COMMIT_MSG%%$'\n'*}"
if [[ $COMMIT_TITLE =~ ^(v|Version )[0-9]+\.[0-9]+\.[0-9]+( \(#[0-9]+\))?$ ]]
then
PACKAGE_VERSION="${COMMIT_TITLE#Version }"
PACKAGE_VERSION="${PACKAGE_VERSION#v}"
PACKAGE_VERSION="${PACKAGE_VERSION%% *}"
echo version=${PACKAGE_VERSION} >> $GITHUB_OUTPUT
echo should_continue=1 >> ${GITHUB_OUTPUT}
else
echo should_continue=0 >> ${GITHUB_OUTPUT}
gh run cancel vars
fi
- name: check package versions
if: steps.vars.outputs.should_continue == 1
run: |
if node ./bump-versions.mjs ${{ steps.vars.outputs.version }} &> temp-bump-versions.txt
then
echo "Package versions did not match ${{ steps.vars.outputs.version }}."
exit 1
fi
if
grep -zq 'bumping studio-plugin.npm ERR! Version not changed' temp-bump-versions.txt &&
grep -zq 'bumping studio-ui.npm ERR! Version not changed' temp-bump-versions.txt &&
grep -zq 'bumping studio.npm ERR! Version not changed' temp-bump-versions.txt
then
if git diff --exit-code
then
exit 0
fi
echo "Found unexpected git diff from running the bump-versions.mjs script."
exit 1
fi
echo "Error running the bump-version.mjs script."
cat temp-bump-versions.txt
exit 1
# - uses: ./.github/setup-ci
# - name: check linting
# run: |
# npm run autofix
# if git diff --exit-code
# exit 0
# fi
# echo "Found unexpected git diff from running `npm run autofix`."
# exit 1
# - name: run tests
# uses: ./.github/workflows/run-tests.yml
run-tests:
needs: check-for-release
# if: !contains(needs.check-for-release.outputs.status, 'skipped')
uses: ./.github/workflows/run-tests.yml