-
Notifications
You must be signed in to change notification settings - Fork 17
50 lines (50 loc) · 1.39 KB
/
ci.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
name: CI
on:
- push
- pull_request
jobs:
quality-checks:
name: Quality Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
#with:
# fetch-tags: true
# fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
version: 9
- name: install
run: pnpm install
- name: format-check
run: pnpm run format --check
- name: lint
run: pnpm run lint
- name: build
run: pnpm run build
- name: test
run: pnpm run test
- name: smoke
run: pnpm run smoke
- name: publish
if: startsWith(github.ref, 'refs/tags/v')
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git fetch --tags --force
# we need to have a safe way to store of allowedSigners
git config --local --add gpg.ssh.allowedSignersFile ./allowed_signers
echo "GITHUB_REF->"$GITHUB_REF
# test tag signature
git tag -v $(git describe --tags --abbrev=0)
# should only run if a tag is set
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
pnpm run publish