WMSDK-556: support RN 0.82 for simple integration #47
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: Branch Protection | |
| on: | |
| pull_request: | |
| types: [ opened, edited, synchronize ] | |
| branches: | |
| - master | |
| - develop | |
| jobs: | |
| check-rc-pattern: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.head_ref, 'release') | |
| steps: | |
| - name: Check RC pattern | |
| run: | | |
| if [[ "${{ github.head_ref }}" =~ release/[0-9]+\.[0-9]+\.[0-9]+-rc ]]; then | |
| echo "Branch name contains release/version-rc pattern. Merging is not allowed. Only stable release should be merge into master" | |
| exit 1 | |
| fi | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| check-master-version: | |
| needs: check-rc-pattern | |
| runs-on: ubuntu-latest | |
| if: github.base_ref == 'master' && startsWith(github.head_ref, 'release') | |
| steps: | |
| - name: Checkout master branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: master | |
| path: master | |
| - name: Checkout release branch | |
| uses: actions/checkout@v4 | |
| with: | |
| ref: ${{ github.head_ref }} | |
| path: release | |
| - name: Extract versions | |
| run: | | |
| MASTER_VERSION=$(grep 'target-version' master/package.json | awk '{print $2}' | tr -d '",') | |
| RELEASE_VERSION=$(grep 'target-version' release/package.json | awk '{print $2}' | tr -d '",') | |
| echo "MASTER_VERSION=$MASTER_VERSION" >> $GITHUB_ENV | |
| echo "RELEASE_VERSION=$RELEASE_VERSION" >> $GITHUB_ENV | |
| - name: Compare versions | |
| uses: jackbilestech/[email protected] | |
| with: | |
| head: ${{ env.RELEASE_VERSION }} | |
| base: ${{ env.MASTER_VERSION }} | |
| operator: '>' |