-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.5 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
61
62
name: Release and Publish
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
id: get-tag-name
with:
script: return context.payload.ref.replace(/refs\/tags\//, '');
result-encoding: string
- name: Checkout Code
uses: actions/checkout@v2.4.0
- name: Use Node 18
uses: actions/setup-node@v1
with:
node-version: 18
- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- name: Lint
run: npm run lint
- name: Test
run: npm run test --ci --coverage --maxWorkers=2
- name: Build
run: npm run build
- name: Pack
run: npm pack
- name: Release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: '${{ secrets.GITHUB_TOKEN }}'
title: 'readable-regexp ${{steps.get-tag-name.outputs.result}}'
prerelease: false
files: |
*.tgz
- name: Publish
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
- name: Deploy TypeDoc
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run deploy -- -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}