chore(setup): run linter before building on workflows
This commit is contained in:
24
.github/workflows/publish.yml
vendored
24
.github/workflows/publish.yml
vendored
@@ -5,8 +5,29 @@ on:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
Lint:
|
||||
if: "${{ contains(github.event.head_commit.message, 'chore(release): publish') == false }}"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
|
||||
- name: Install dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: ESLint
|
||||
run: yarn lint
|
||||
|
||||
Build:
|
||||
if: "${{ contains(github.event.head_commit.message, 'chore(release): publish') == false }}"
|
||||
needs: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
@@ -40,9 +61,6 @@ jobs:
|
||||
- name: Build
|
||||
run: yarn build:all
|
||||
|
||||
- name: ESLint
|
||||
run: yarn lint
|
||||
|
||||
- name: Build Android
|
||||
run: yarn android:bundle
|
||||
|
||||
|
||||
Reference in New Issue
Block a user