Disable the Unity LTS2020 property drawer recursive property crash workaround It appears to work in LTS2022 #25
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Request | |
| on: | |
| # trigger on pull request to main | |
| pull_request: | |
| branches: | |
| - main | |
| # allow triggering manually for debugging & testing workflow | |
| workflow_dispatch: | |
| jobs: | |
| get-version: | |
| name: Get package.json "version" | |
| runs-on: ubuntu-latest | |
| # map the job outputs to step outputs | |
| outputs: | |
| version: ${{ steps.parse-step.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Parse version From package.json | |
| id: parse-step | |
| run: | | |
| regex='"version" *: *"([0-9]+\.[0-9]+\.[0-9]+)"' | |
| [[ `cat package.json` =~ $regex ]] && echo "::set-output name=version::${BASH_REMATCH[1]}" | |
| check-version-changelog: | |
| name: Check version & CHANGELOG | |
| runs-on: ubuntu-latest | |
| needs: get-version | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Verify the "version" in package.json hasn't already been released | |
| run: | | |
| git fetch --prune --unshallow --tags | |
| tag_match=`git tag -l v${{ needs.get-version.outputs.version }}` | |
| [[ -z "$tag_match" ]] | |
| - name: Check CHANGELOG.md has notes for the package.json "version" | |
| run: | | |
| grep "## *\[${{ needs.get-version.outputs.version }}\]" CHANGELOG.md | |
| check-version-incremented: | |
| # checks that one of the MAJOR.MINOR.PATCH versions is updated by 1, all trailing versions must be 0 | |
| name: Check version incremented | |
| runs-on: ubuntu-latest | |
| needs: get-version | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| # check out the branch PR is merging into | |
| ref: ${{ github.base_ref }} | |
| - name: Fetch version From package.json from base branch | |
| run: | | |
| regex='"version" *: *"([0-9]+\.[0-9]+\.[0-9]+)"' | |
| [[ `cat package.json` =~ $regex ]] && echo "OLD_VERSION=${BASH_REMATCH[1]}" >> $GITHUB_ENV | |
| # script to validate version chnage. it is in-line instead of referencing a | |
| # file so it'l work calls from external repositories | |
| - name: Compare pull request version change against base branch version | |
| run: | | |
| VERSION=${{ needs.get-version.outputs.version }} | |
| echo "Checking version change from $OLD_VERSION to $VERSION" | |
| IFS='.' | |
| read -a OLD <<< "$OLD_VERSION" | |
| read -a NEW <<< "$VERSION" | |
| error () { echo $1; exit 1; } | |
| if [ ${NEW[0]} -eq ${OLD[0]} ] ; then | |
| if [ ${NEW[1]} -eq ${OLD[1]} ] ; then | |
| if [ $(( ${NEW[2]} - ${OLD[2]} )) -ne 1 ]; then | |
| error "PATCH version must increment by 1" | |
| fi | |
| elif [ $(( ${NEW[1]} - ${OLD[1]} )) -eq 1 ] ; then | |
| if [ ${NEW[2]} -ne 0 ] ; then | |
| error "PATCH version must be set to 0" | |
| fi | |
| else | |
| error "MINOR version incremented incorrectly from ${OLD[1]} to ${NEW[1]}" | |
| fi | |
| elif [ $(( ${NEW[0]} - ${OLD[0]} )) -eq 1 ] ; then | |
| if [[ ${NEW[1]} -ne 0 || ${NEW[2]} -ne 0 ]] ; then | |
| error "MINOR and PATCH version must be set to 0" | |
| fi | |
| else | |
| error "MAJOR version incremented incorrectly from ${OLD[0]} to ${NEW[0]}" | |
| fi |