Skip to content

Commit 321c536

Browse files
committed
Add build + release GitHub Actions workflows (Phase 6 part 1)
build.yml: npm ci -> gulp lint -> gulp bundle -> upload-artifact on every push to main and every PR. Reviewers get a one-click download of a working bundle to preview against any consumer site without needing a release tag. release.yml: on every v* tag push, npm ci -> gulp bundle -> softprops/action-gh-release@v2 with generate_release_notes + fail_on_unmatched_files. Auto-publishes build/ui-bundle.zip to the GitHub release for that tag. workflow_dispatch is enabled so we can manually republish if the asset upload fails for infrastructure reasons. Consumers reference the bundle via: https://github.com/SKaiNET-developers/skainet-docs-ui/releases/download/v1.0.0/ui-bundle.zip https://github.com/SKaiNET-developers/skainet-docs-ui/releases/latest/download/ui-bundle.zip Phase 6 part 1 of 2. Part 2 creates the GitHub repo, pushes all five Phase commits, tags v1.0.0 to trigger the first release, and opens consumer PRs against mainline SKaiNET + SKaiNET-transformers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent c872384 commit 321c536

2 files changed

Lines changed: 75 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build UI bundle
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 10
12+
steps:
13+
- uses: actions/checkout@v4
14+
15+
- name: Set up Node
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: '20'
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
24+
- name: Lint
25+
run: npx gulp lint
26+
27+
- name: Build bundle
28+
run: npx gulp bundle
29+
30+
- name: Inspect bundle
31+
run: |
32+
ls -lh build/ui-bundle.zip
33+
unzip -l build/ui-bundle.zip | tail -5
34+
35+
- name: Upload artifact
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: ui-bundle
39+
path: build/ui-bundle.zip
40+
if-no-files-found: error

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Publish UI bundle
2+
3+
on:
4+
push:
5+
tags: ['v*']
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
publish:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 10
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Set up Node
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
cache: npm
23+
24+
- name: Install dependencies
25+
run: npm ci
26+
27+
- name: Build bundle
28+
run: npx gulp bundle
29+
30+
- name: Publish release
31+
uses: softprops/action-gh-release@v2
32+
with:
33+
files: build/ui-bundle.zip
34+
generate_release_notes: true
35+
fail_on_unmatched_files: true

0 commit comments

Comments
 (0)