-
-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (51 loc) · 1.63 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
name: Release
on:
push:
branches:
- master
paths:
- 'ngx-barcode-scanner/**'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Install prerequisites and test
env:
CHROME_BIN: "/usr/bin/chromium-browser"
run: sudo apt-get update -yq && sudo apt-get install xvfb -yq && xvfb-run --auto-servernum npm test
- name: Conventional Changelog Action
id: changelog
uses: TriPSs/conventional-changelog-action@v3.18.0
with:
github-token: ${{ secrets.github_token }}
version-file: ./ngx-barcode-scanner/package.json
tag-prefix: ""
- name: Create Release
uses: actions/create-release@v1
if: steps.changelog.outputs.skipped != 'true'
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
with:
tag_name: ${{ steps.changelog.outputs.tag }}
release_name: ${{ steps.changelog.outputs.tag }}
body: ${{ steps.changelog.outputs.clean_changelog }}