mirror of
https://github.com/rive-app/rive-react.git
synced 2026-03-13 08:22:30 +08:00
36 lines
966 B
YAML
36 lines
966 B
YAML
name: Publish to NPM
|
|
on:
|
|
pull_request:
|
|
types: [closed]
|
|
branches:
|
|
- main
|
|
jobs:
|
|
merge_job:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '12.x'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- name: Install Modules
|
|
run: npm ci
|
|
- name: Run type check
|
|
run: npm run types:check
|
|
- name: Run Linter
|
|
run: npm run lint
|
|
- name: Run Tests
|
|
run: npm test
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Git config
|
|
run: |
|
|
git config --local user.email 'hello@rive.app'
|
|
git config --local user.name ${{ github.actor }}
|
|
- name: Authenticate with registry
|
|
run: npm config set //registry.npmjs.org/:_authToken ${{ secrets.NPM_TOKEN }}
|
|
- name: Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
|
|
run: npm run release
|