Skip to content

Workflow file for this run

name: On Push
on: [push]
jobs:
lint_test_generate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node ${{ steps.nvm.outputs.NVMRC }}
uses: actions/[email protected]
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- name: Install
run: yarn install --network-timeout 1000000
- name: Lint
run: yarn lint
- name: Test
run: yarn unittest
- name: Generate
run: yarn generate
outputs:
NVMRC: ${{ steps.nvm.outputs.NVMRC }}
call_android_workflow:
needs: lint_test_generate
uses: react-native-mapbox-gl/maps/.github/workflows/android-actions.yml@master
with:
NVMRC: ${{ needs.lint_test_generate.outputs.NVMRC }}
secrets:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
call_ios_workflow:
needs: lint_test_generate
uses: react-native-mapbox-gl/maps/.github/workflows/ios-actions.yml@master
with:
NVMRC: ${{ needs.lint_test_generate.outputs.NVMRC }}
secrets:
MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
publish:
if: startsWith(github.ref, 'refs/tags/')
needs: [lint_test_generate, call_android_workflow, call_ios_workflow]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup node ${{ steps.nvm.outputs.NVMRC }}
uses: actions/[email protected]
with:
node-version: ${{ needs.lint_test_generate.outputs.NVMRC }}
registry-url: https://registry.npmjs.org/
- name: Install and Publish
run: npm install --force && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}