Skip to content

Commit d840ab8

Browse files
committed
2 parents 45ea29e + f5087a3 commit d840ab8

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*.*.*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-release:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Setup Node
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 20
23+
cache: npm
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Build
29+
run: npm run build
30+
31+
- name: Package standalone zip
32+
shell: bash
33+
run: |
34+
VERSION="${GITHUB_REF_NAME}"
35+
APP="veeam-single-ui"
36+
OUTROOT="dist"
37+
OUTDIR="${OUTROOT}/${APP}-${VERSION}-standalone"
38+
39+
rm -rf "$OUTROOT"
40+
mkdir -p "$OUTDIR"
41+
42+
# Next.js standalone output
43+
cp -R .next/standalone/* "$OUTDIR/"
44+
45+
# Required alongside standalone
46+
mkdir -p "$OUTDIR/.next"
47+
cp -R .next/static "$OUTDIR/.next/static"
48+
if [ -d "public" ]; then cp -R public "$OUTDIR/public"; fi
49+
50+
# Helpful files
51+
if [ -f ".env.example" ]; then cp .env.example "$OUTDIR/"; fi
52+
if [ -f "README.md" ]; then cp README.md "$OUTDIR/"; fi
53+
54+
# Zip
55+
(cd "$OUTROOT" && zip -r "${APP}-${VERSION}-standalone.zip" "$(basename "$OUTDIR")")
56+
57+
- name: Create GitHub Release and upload zip
58+
uses: softprops/action-gh-release@v2
59+
with:
60+
generate_release_notes: true
61+
files: dist/*.zip

0 commit comments

Comments
 (0)