-
Notifications
You must be signed in to change notification settings - Fork 155
39 lines (36 loc) · 1.04 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Project CI
on: [push, pull_request]
jobs:
lint:
strategy:
matrix:
platform: [ubuntu-latest]
node: ['14', '16', '18', '20']
name: lint
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- name: install dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: check lint
run: yarn lint
release:
name: Semantic release
runs-on: 'ubuntu-latest'
needs: lint
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- name: install dependencies
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts
- name: release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NPM_TOKEN: ${{secrets.NPM_TOKEN}}