Skip to content

Commit 3796007

Browse files
author
karei
committed
ci: add dist release workflow
1 parent 3096f8e commit 3796007

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

.github/workflows/release-dist.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Release Frontend Dist
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
build-and-release:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: "20"
20+
21+
- name: Install deps
22+
run: npm ci
23+
24+
- name: Build
25+
run: npm run build
26+
27+
- name: Pack dist
28+
run: |
29+
VERSION="${GITHUB_REF_NAME#v}"
30+
TAR="EnergyIntegrationWebApp-${VERSION}-dist.tar.gz"
31+
tar -czf "$TAR" -C dist .
32+
echo "TAR_NAME=$TAR" >> $GITHUB_ENV
33+
34+
- name: Release
35+
uses: softprops/action-gh-release@v2
36+
with:
37+
files: ${{ env.TAR_NAME }}

0 commit comments

Comments
 (0)