-
Notifications
You must be signed in to change notification settings - Fork 21
47 lines (37 loc) · 985 Bytes
/
releases.yml
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
name: 🎉 Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v2
- name: Set node
uses: actions/setup-node@v4
with:
node-version: lts/*
cache: pnpm
- run: npx changelogithub
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GH_TOKEN}}
- name: Install
run: pnpm install --no-frozen-lockfile
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
- name: Config npm
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > dist/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish to npm
run: cd dist && pnpm run publish:npm