-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (42 loc) · 1.32 KB
/
Copy pathpublish.yml
File metadata and controls
42 lines (42 loc) · 1.32 KB
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
name: Push to master
on:
push:
branches:
- master
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
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: Build
run: yarn build
- name: Linting
run: yarn lint
- name: Testing
run: yarn test
- name: Set up package registry auth token
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Publish to NPM
run: yarn publish --access public
- name: Extract version from package.json
id: extract_version
uses: Saionaro/extract-package-version@v1.1.1
- name: Create release on github
uses: marvinpinto/action-automatic-releases@v1.2.1
with:
repo_token: ${{ secrets.GH_TOKEN }}
prerelease: false
title: v${{ steps.extract_version.outputs.version }}
automatic_release_tag: v${{ steps.extract_version.outputs.version }}