-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (73 loc) · 1.9 KB
/
Copy pathci.yaml
File metadata and controls
89 lines (73 loc) · 1.9 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Continuous Integration and Deployment
on:
push:
tags:
- "v*"
permissions:
contents: write
id-token: write
pages: write
checks: write
deployments: write
actions: write
packages: write
statuses: write
security-events: write
repository-projects: write
pull-requests: write
issues: write
discussions: write
jobs:
lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
cache: "pnpm"
- name: Install NodeJS dependencies
run: pnpm install
- name: Run linting
run: pnpm lint:ci
- name: Run type check
run: pnpm types:check
publish-npm:
needs: [lint-and-test]
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"
scope: "@programmer_network"
cache: "pnpm"
- name: Install NodeJS dependencies
run: pnpm install
- name: Build the code
run: pnpm build
- name: Set up Git identity
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
- name: Publish to npm
run: npm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}