-
Notifications
You must be signed in to change notification settings - Fork 2
59 lines (50 loc) · 1.72 KB
/
release.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
48
49
50
51
52
53
54
55
56
57
58
59
# trigger only when packages code modified are merged on main branch
name: Bump version & publish to NPM
on:
push:
branches:
- main
paths:
- 'packages/next-youtube-livechat/**'
workflow_dispatch: {}
jobs:
release:
name: Release
if: ${{ github.repository_owner == 'sawaYch' }}
runs-on: ubuntu-latest
permissions:
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Restore dependencies
run: npx ci
- name: Build the package next-youtube-livechat
run: npm run build
working-directory: packages/next-youtube-livechat
- name: Lint check
run: npm run lint
working-directory: packages/next-youtube-livechat
- name: Code format check
run: npm run format
working-directory: packages/next-youtube-livechat
- name: Typescript check
run: npm run typecheck
working-directory: packages/next-youtube-livechat
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: npm run release
version: npm run version
commit: 'chore: new release'
title: 'chore: new release candidate'
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}