-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (57 loc) · 1.78 KB
/
ci.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: CI
on:
push:
branches:
- master
jobs:
ci:
runs-on: ubuntu-22.04
steps:
- name: 🛎 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 🛠 Setup node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: 📦 Install
run: npm ci
- name: 🧑🏫 Check Format
run: npm run format
- name: 🕵️ Lint
run: npm run lint
- name: 👷♂️ Build
run: npm run build
- name: 🧪 Test
run: npm run test
- name: 💯 Report to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: 👀 Check for version update
id: version
uses: EndBug/version-check@v1
with:
file-url: https://unpkg.com/small-store/package.json
static-checking: localIsNew
- name: 📋 Get Commits since last Release
if: steps.version.outputs.changed == 'true'
uses: simbo/changes-since-last-release-action@v1
id: changes
- name: 🎁 Create tag and GitHub Release
if: steps.version.outputs.changed == 'true'
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version }}
release_name: Release ${{ steps.version.outputs.version }}
body: |
Changes since ${{ steps.changes.outputs.last-tag }}:
${{ steps.changes.outputs.log }}
- name: 🚚 Publish to npm
if: steps.version.outputs.changed == 'true'
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_AUTH_TOKEN }}