-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (39 loc) · 1.03 KB
/
release.yml
File metadata and controls
42 lines (39 loc) · 1.03 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
name: Release
on:
push:
branches:
- main
jobs:
release:
if: startsWith(github.event.head_commit.message, 'v')
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2.4.0
with:
version: 6
- uses: actions/setup-node@v2
with:
node-version: 16
cache: pnpm
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: pnpm install
- name: Check formatting
run: pnpm prettier:check-all
- name: Lint
run: pnpm eslint:lint-all
- name: Test
run: pnpm test
- name: Publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
name: ${{ github.event.head_commit.message }}
tag_name: ${{ github.event.head_commit.message }}
token: ${{ github.token }}