-
Notifications
You must be signed in to change notification settings - Fork 35
101 lines (83 loc) · 2.46 KB
/
release.yaml
File metadata and controls
101 lines (83 loc) · 2.46 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Release Package
on:
workflow_dispatch:
inputs:
dry_run:
description: 'Dry run (skip actual publish)'
required: true
type: boolean
default: true
increment:
description: 'Version increment (patch, minor, major)'
required: true
type: choice
options:
- patch
- minor
- major
default: patch
pre_release:
description: 'Pre-release identifier (e.g. beta, alpha, rc) — leave empty for a stable release'
required: false
type: string
default: ''
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 15
environment: npm-publish
permissions:
contents: write
id-token: write
issues: write
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version-file: .bun-version
- name: Setup Node.js (for npm with OIDC support)
uses: actions/setup-node@v4
with:
node-version: '24'
registry-url: 'https://registry.npmjs.org'
- name: Configure git
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Install dependencies
run: bun install
- name: Build library
run: bun run build
- name: Check types
run: bun run check:typescript
- name: Check linting and formatting
run: bun run lint
- name: Check circular dependencies
run: bun run circular:check
- name: Install Playwright browsers
run: bunx playwright install --with-deps chromium
working-directory: packages/uniwind
- name: Run tests
run: bun run test
- name: Release
working-directory: packages/uniwind
run: |
PRE_RELEASE="${{ inputs.pre_release }}"
INCREMENT="${{ inputs.increment }}"
DRY_RUN="${{ inputs.dry_run }}"
ARGS="--ci $INCREMENT"
if [ -n "$PRE_RELEASE" ]; then
ARGS="$ARGS --preRelease=$PRE_RELEASE"
fi
if [ "$DRY_RUN" = "true" ]; then
ARGS="$ARGS --dry-run"
fi
npx release-it $ARGS
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}