-
-
Notifications
You must be signed in to change notification settings - Fork 93
53 lines (42 loc) · 1.57 KB
/
ngx-clipboard.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: ngx-clipboard
on:
pull_request:
workflow_dispatch:
inputs:
isBeta:
description: 'Is this a beta release?'
required: false
default: 'false'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'yarn'
- uses: actions/cache@v4
id: angular-cache
with:
path: |
.angular/cache
key: ${{ runner.os }}-ng-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-ng
- name: Install dependencies
run: yarn --pure-lockfile --non-interactive --no-progress
# Fix linting errors first
# - name: Run TSLint
# run: yarn lint
- name: Run tests
run: yarn test --configuration=ci
- name: Build host app
run: yarn ng build library-host --configuration=production
- name: Build library
run: yarn build
- name: Publish library
if: github.event_name == 'workflow_dispatch'
run: |
echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" > .npmrc && npm publish ./dist/lib --access public --tag ${{ github.event.inputs.isBeta == 'true' && 'next' || 'latest' }}
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}