Skip to content

Commit a1accf8

Browse files
bastiioneMPee584
authored andcommitted
feat: build debian package in CI
1 parent 8e9cd0b commit a1accf8

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release Debian
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
release_debian:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: debian:bookworm-slim
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Install build dependencies
18+
run: |
19+
apt-get update
20+
apt-get install -y build-essential debhelper devscripts nodejs npm
21+
22+
- name: Building Package
23+
run: |
24+
npm install -g pkg
25+
26+
npm install
27+
npm run build
28+
npx pkg . -t node18-linux --output release/linux/liascript-devserver
29+
30+
- name: Build Debian package
31+
run: dpkg-buildpackage -us -uc
32+
33+
- name: Move Debian packages
34+
run: |
35+
mkdir -p artifacts
36+
mv ../*.deb artifacts/
37+
mv ../*.buildinfo artifacts/
38+
39+
- name: Upload artifacts
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: debian-packages
43+
path: artifacts/
44+
45+
- name: Create Release
46+
uses: softprops/action-gh-release@v1
47+
with:
48+
files: artifacts/*.deb
49+
generate_release_notes: true
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/create-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ name: Create Release
77

88
jobs:
99
build:
10+
if: github.repository == 'LiaScript/LiaScript-DevServer'
1011
runs-on: ubuntu-latest
1112
steps:
1213
- name: Checkout Code

.github/workflows/npm-publish.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ name: Publish on NPM
88

99
jobs:
1010
build:
11+
if: github.repository == 'LiaScript/LiaScript-DevServer'
1112
runs-on: ubuntu-latest
1213
steps:
1314
- name: Checkout Code

0 commit comments

Comments
 (0)