Skip to content

Commit 2fa5f74

Browse files
authored
Merge pull request #99 from cosmos/gh-actions
Add GitHub Actions build job
2 parents 5fb1467 + 9de70bb commit 2fa5f74

File tree

2 files changed

+45
-45
lines changed

2 files changed

+45
-45
lines changed

.circleci/config.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [ "main" ]
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
submodules: true
15+
16+
- name: Use Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 22
20+
cache: 'npm'
21+
22+
- name: Install buf
23+
run: |
24+
wget -O buf "https://github.com/bufbuild/buf/releases/download/v1.16.0/buf-$(uname -s)-$(uname -m)"
25+
chmod +x buf
26+
sudo mv buf /usr/local/bin
27+
buf --version
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Generate code (.proto -> .ts)
33+
run: npm run codegen
34+
35+
- name: Ensure schemas are up-to-date
36+
run: |
37+
CHANGES_IN_REPO=$(git status --porcelain)
38+
if [[ -n "$CHANGES_IN_REPO" ]]; then
39+
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
40+
git status && git --no-pager diff
41+
exit 1
42+
fi
43+
44+
- name: Build (.ts -> .js/.d.ts)
45+
run: npm run build

0 commit comments

Comments
 (0)