-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.57 KB
/
publish-package.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
60
61
62
on:
workflow_dispatch:
branches:
- master
inputs:
package:
description: Package name
required: true
type: choice
options:
- commitlint-config
- eslint-config
- prettier-config
increment:
description: Increment version type
default: patch
type: choice
options:
- patch
- minor
- major
name: Publish package
jobs:
publish:
name: Publish ${{inputs.package}} package (${{inputs.increment}})
runs-on: macos-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
name: Checkout
with:
ref: ${{github.event.ref}}
fetch-depth: 0
- uses: actions/setup-node@v3
name: Setup node
with:
node-version: 18.14.2
registry-url: https://registry.npmjs.org/
- run: npm i bun -g
name: Install bun
- run: bun install --frozen-lockfile
name: Install dependencies
- run: |
echo "Bun version: $(bun -v)"
echo "NodeJS version: $(node -v)"
echo "NPM version: $(npm -v)"
name: Display versions
- run: bun run format
name: Format code
- run: bun run lint
name: Lint code
- run: bun run release --increment ${{inputs.increment}}
name: Publish ${{inputs.increment}} release
working-directory: packages/${{inputs.package}}
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}