-
Notifications
You must be signed in to change notification settings - Fork 11
42 lines (36 loc) · 1.05 KB
/
release-new-version.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
name: Release new version
on:
push:
branches: [main]
paths:
- ".github/workflows/release-new-version.yml"
- "src/**"
- "types/**"
- "package.json"
jobs:
updateVersion:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"
- name: Configure git
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
- run: npm ci
- name: Typecheck
run: npm run config typecheckOnce
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm version patch --allow-same-version
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
npm publish
git push
git push --tags --force
gh release create "v$(node -p -e "require('./package.json').version")"