-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.55 KB
/
package.yaml
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
name: Release Debian package
on:
push:
tags:
- "v*.*.*" # run on semver tags
- "v*.*.*-*" # run on pre-release tags
workflow_dispatch:
permissions:
packages: write
contents: write
discussions: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install
- name: Build Next.js application
run: bun run build
- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update control file version
run: |
sed -i "s/^Version: .*/Version: ${VERSION}/" debian/DEBIAN/control
cat debian/DEBIAN/control
- name: Prepare Debian package structure
run: |
cp -rT .next/standalone debian/usr/share/dashboard
cp -r .next/static debian/usr/share/dashboard/.next
cp -r public debian/usr/share/dashboard
- name: Build Debian package
run: dpkg-deb --build debian relayer-admin-dashboard.deb
- name: Upload Debian package
uses: actions/upload-artifact@v4
with:
name: relayer-admin-dashboard-debian
path: relayer-admin-dashboard.deb
- name: Release
uses: softprops/action-gh-release@v2
with:
files: relayer-admin-dashboard.deb
generate_release_notes: true
make_latest: true
prerelease: ${{ contains(github.ref, '-') }}