-
-
Notifications
You must be signed in to change notification settings - Fork 2
60 lines (52 loc) · 1.49 KB
/
release.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
name: release
on:
push:
tags:
- 'v*'
jobs:
build-unix:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest']
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: |
npm ci --ignore-scripts
npm audit fix
- name: Test
run: npm test
- name: Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: mikaelvesavuori/mikrovalid
- name: Send coverage report with Code Climate
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
coverageLocations: ${{ github.workspace }}/coverage/lcov.info:lcov
publish-npm:
needs: ['build-unix']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: |
npm ci --ignore-scripts
npm run build
git config --global user.email ${{ secrets.GIT_EMAIL }}
git config --global user.name ${{ secrets.GIT_NAME }}
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}