-
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (61 loc) · 1.7 KB
/
release.yml
File metadata and controls
62 lines (61 loc) · 1.7 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
name: release
on:
workflow_dispatch:
inputs:
version:
type: choice
description: Version number to increment
required: true
default: minor
options:
- patch
- minor
- major
jobs:
release:
env:
CI: true
GITHUB_TOKEN: ${{ secrets.ACTION_GITHUB_TOKEN }}
NPM_OTP_TOKEN: ${{ github.event.inputs.otp }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Need history for changelog generation
- uses: pnpm/action-setup@v2
with:
version: 10.32.1
- uses: actions/setup-node@v6
with:
node-version: 24.14.0
cache: pnpm
- run: pnpm i
- name: types
run: pnpm run check:types
- name: build
run: pnpm run build
- name: test
id: test
if: ${{ always() }}
run: pnpm run test --coverage
- name: lint
if: ${{ always() }}
run: pnpm run lint
- name: style
if: ${{ always() }}
run: pnpm run format:check
- name: npm auth
run: pnpm set "//registry.npmjs.org/:_authToken" ${{ env.NPM_TOKEN }}
- name: config git user
run: |
git config --global user.name ${{ secrets.ACTION_GITHUB_USERNAME }};
git config --global user.email ${{ secrets.ACTION_GITHUB_EMAIL }};
- name: perform release
run: |
pnpm run release \
${{ github.event.inputs.version }} \
--ci
- name: codecov # Perform after version publishing
if: steps.test.outcome == 'success'
uses: codecov/codecov-action@v5