This repository has been archived by the owner on Mar 10, 2024. It is now read-only.
feat: Add Expo Support for React Native Preset #249
Workflow file for this run
This file contains 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: CI | |
on: | |
push: | |
branches: | |
# Match SemVer major release branches, e.g. "2.x" or ".x" | |
- '[0-9]+.x' | |
- 'main' | |
- 'next' | |
- 'alpha' | |
- 'beta' | |
- '!all-contributors/**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
env: | |
NODE_VERSION: '14.x' | |
jobs: | |
setup: | |
name: Setup | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest ] | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ env.NODE_VERSION }}' | |
- name: Cache node modules | |
id: cache | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} | |
- name: Install Dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: npm ci --ignore-scripts && npm run postinstall | |
eslint: | |
name: Eslint | |
runs-on: ubuntu-latest | |
needs: [setup] | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ env.NODE_VERSION }}' | |
- name: Fetch all branches | |
run: | | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} | |
- name: ESLint | |
run: npm run ci:lint -- $(git diff --diff-filter d --name-only origin/${{ github.base_ref }}...HEAD -- '*.js' '*.ts' '*.tsx') | |
typescript: | |
name: Typescript | |
runs-on: ubuntu-latest | |
needs: [setup] | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ env.NODE_VERSION }}' | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} | |
- name: Typescript | |
run: npm run ci:tsc | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
needs: [setup] | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ env.NODE_VERSION }}' | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} | |
- name: Test | |
run: npm run test | |
release: | |
needs: [test] | |
if: github.event_name == 'push' && github.repository == 'smeijer/unimported' | |
runs-on: ubuntu-latest | |
environment: npm | |
steps: | |
- name: Cancel previous runs | |
uses: styfle/cancel-workflow-action@0.9.0 | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '${{ env.NODE_VERSION }}' | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node_modules-${{ hashFiles('package-lock.json') }} | |
- name: Build | |
run: npm run build | |
- name: Release | |
uses: cycjimmy/semantic-release-action@v2 | |
with: | |
semantic_version: 17 | |
branches: | | |
[ | |
'+([0-9])?(.{+([0-9]),x}).x', | |
'main', | |
'next', | |
{ name: 'alpha', prerelease: true }, | |
{ name: 'beta', prerelease: true } | |
] | |
env: | |
GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |