-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (63 loc) · 1.71 KB
/
typescript.yaml
File metadata and controls
68 lines (63 loc) · 1.71 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: typescript
on:
push:
branches:
- master
- fix/*
permissions:
id-token: write
contents: read
jobs:
tests:
runs-on: ubuntu-latest
defaults:
run:
working-directory: typescript
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
package_json_file: typescript/package.json
- uses: actions/setup-node@v6
with:
node-version: "24"
- name: install
run: pnpm install
- name: test
run: pnpm exec jest --coverage
- name: codecov
uses: codecov/codecov-action@v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./typescript/coverage/lcov.info
flags: typescript
verbose: true
release:
needs: tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: typescript
if: github.ref == 'refs/heads/master'
name: npm upload
steps:
- uses: actions/checkout@v6
- uses: pnpm/action-setup@v5
with:
package_json_file: typescript/package.json
- uses: actions/setup-node@v6
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- run: npm install -g npm@latest
- name: remove authToken from .npmrc
run: |
NPM_RC=$(npm config get userconfig)
sed -i '/_authToken/d' "$NPM_RC" 2>/dev/null || true
- name: publish
run: |
pnpm install
pnpm build
VERSION=$(node -p "require('./package.json').version")
TAG=$( [[ "$VERSION" == *-* ]] && echo "--tag next" || echo "" )
pnpm publish --access public --provenance $TAG --no-git-checks || true