Skip to content

Publish Rive React Native release #87

Publish Rive React Native release

Publish Rive React Native release #87

name: Publish Rive React Native release
on:
workflow_dispatch:
jobs:
publish:
name: Install and publish
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- 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: 18.x
- 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: Authenticate with registry
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_AUTOMATION_TOKEN }}
- name: Publish
run: |
chmod +x ./scripts/add_build_number.sh
yarn release --increment=$(cat version.txt)
env:
GITHUB_TOKEN: ${{ secrets.REPO_PAT }}