-
Notifications
You must be signed in to change notification settings - Fork 12
54 lines (45 loc) · 1.27 KB
/
release-ts.yaml
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 TypeScript NPM Package
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Check for changes
uses: dorny/paths-filter@v2
id: changes
with:
filters: |
ts:
- 'ts/**'
- name: Setup Node.js
if: steps.changes.outputs.ts == 'true'
uses: actions/setup-node@v4
with:
node-version: 20.8.1
cache: npm
cache-dependency-path: ts/package-lock.json
- name: Setup env
if: steps.changes.outputs.ts == 'true'
uses: HatsuneMiku3939/direnv-action@v1
- name: Run tests
if: steps.changes.outputs.ts == 'true'
run: SUB_TESTS=ts make test
- name: Publish npm package
if: steps.changes.outputs.ts == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: make release-ts
- name: Upload Test Coverage
uses: codecov/codecov-action@v4
with:
files: ./ts/coverage
token: ${{ secrets.CODECOV_TOKEN }}