-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (73 loc) · 2.15 KB
/
Copy pathci.yml
File metadata and controls
89 lines (73 loc) · 2.15 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
name: CI
on:
pull_request:
push:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- name: Setup Node (for tooling)
uses: actions/setup-node@v5
with:
node-version: 22
- name: Install deps
run: bun install --no-cache --frozen-lockfile
- name: Build
run: bun run build --filter='!@react-text-game/docs'
- name: Lint
run: bun run lint
- name: Typecheck
run: bun run typecheck
- name: Test
run: bun run test:coverage
# Publishes packages whose version in package.json is not yet on npm.
# Bump versions locally with `bun run version-packages`, commit, push to main.
# If unversioned changesets reach main, this opens a "Version Packages" PR instead.
release:
needs: build-test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
concurrency:
group: release-${{ github.ref }}
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.9
- name: Setup Node & npm registry
uses: actions/setup-node@v5
with:
node-version: 22
registry-url: https://registry.npmjs.org
- name: Install deps
run: bun install --no-cache --frozen-lockfile
- name: Build publishable packages
run: bun run build --filter='!@react-text-game/docs'
- name: Publish
uses: changesets/action@v1
with:
version: bun run version-packages
publish: bun run release
commit: "Version Packages"
title: "Version Packages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true