forked from vercel/serve
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (33 loc) · 879 Bytes
/
publish.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
name: Publish Package
on:
workflow_dispatch:
release:
types: [published]
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Setup PNPM 7
uses: pnpm/action-setup@v2.0.1
with:
version: 7
- name: Setup Node 18
uses: actions/setup-node@v2
with:
node-version: 18
registry-url: 'https://registry.npmjs.org/'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Compile
run: pnpm compile
- name: Run all tests
run: pnpm test
- name: Publish
# Use `--no-git-checks` due to how GitHub Actions checks out
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}