-
Notifications
You must be signed in to change notification settings - Fork 128
75 lines (67 loc) · 2.13 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Release
on:
workflow_dispatch:
inputs:
package:
description: 'Package'
required: true
type: choice
options:
- anatomy
- react
- solid
- vue
increment:
description: 'Increment'
required: true
default: 'patch'
type: choice
options:
- major
- minor
- patch
preRelease:
description: 'Pre Release'
required: true
default: 'skip'
type: choice
options:
- create
- continue
- skip
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Setup Git User
shell: bash
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Install Dependencies
run: bun install
- name: Build
run: bun ${{ github.event.inputs.package }} build
- name: Create Pre-Release
if: github.event.inputs.preRelease == 'create'
run: bun ${{ github.event.inputs.package }} release-it ${{ github.event.inputs.increment }} --preRelease=beta --ci
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Continue Pre-Release
if: github.event.inputs.preRelease == 'continue'
run: bun ${{ github.event.inputs.package }} release-it --preRelease --ci
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Release
if: github.event.inputs.preRelease == 'skip'
run: bun ${{ github.event.inputs.package }} release-it --ci --increment ${{ github.event.inputs.increment }}
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}