-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (41 loc) · 1.25 KB
/
npm_publish.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
name: Push to master
on:
push:
branches:
- master
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 16
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
run: yarn install --frozen-lockfile --ignore-scripts
- name: Linting
run: yarn lint
- name: Build
run: yarn build
- name: Publish to NPM
uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
- name: Extract version from package.json
id: extract_version
uses: Saionaro/[email protected]
- name: Create release on github
uses: marvinpinto/[email protected]
with:
repo_token: ${{ secrets.GH_TOKEN }}
prerelease: false
title: v${{ steps.extract_version.outputs.version }}
automatic_release_tag: v${{ steps.extract_version.outputs.version }}