Publish Rive React Native release #107
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: Publish Rive React Native release | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| publish: | |
| name: Install and publish | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # Required for OIDC | |
| contents: write # allows this workflow to commit to the repo | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| token: ${{ secrets.PAT_GITHUB }} | |
| - name: Git config | |
| run: | | |
| git config --local user.email '[email protected]' | |
| git config --local user.name ${{ github.actor }} | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/*' | |
| registry-url: 'https://registry.npmjs.org' | |
| - name: Enable Corepack and Use Correct Yarn Version | |
| run: | | |
| corepack enable | |
| corepack prepare [email protected] --activate | |
| - name: Restore dependencies | |
| id: yarn-cache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: | | |
| **/node_modules | |
| .yarn/install-state.gz | |
| key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}-${{ hashFiles('**/package.json', '!node_modules/**') }} | |
| restore-keys: | | |
| ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} | |
| ${{ runner.os }}-yarn- | |
| - name: Debug Yarn State (Optional) | |
| run: yarn install --check-cache | |
| - name: Install dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| run: yarn install --immutable | |
| shell: bash | |
| - name: Cache dependencies | |
| if: steps.yarn-cache.outputs.cache-hit != 'true' | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: | | |
| **/node_modules | |
| .yarn/install-state.gz | |
| key: ${{ steps.yarn-cache.outputs.cache-primary-key }} | |
| - name: Lint | |
| run: yarn lint | |
| - name: Type Check | |
| run: yarn typescript | |
| - name: Build lib | |
| run: yarn prepare | |
| - name: Publish | |
| run: | | |
| chmod +x ./scripts/add_build_number.sh | |
| yarn release --increment=$(cat version.txt) |