build static

This commit is contained in:
kaedwen
2023-07-08 11:57:11 +02:00
parent 4d7b7dfc2e
commit e939e4cc41
3 changed files with 22 additions and 22 deletions
+17 -21
View File
@@ -16,23 +16,6 @@ on:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build-backend:
runs-on: ubuntu-latest
container: "debian:stable-slim"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Prepare
run: |
apt-get update
apt-get install --yes --no-install-recommends make gcc libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- name: Build
run: make build
- uses: ncipollo/release-action@v1
with:
artifacts: "release.tar.gz,foo/*.txt"
build-frontend:
runs-on: ubuntu-latest
container: "debian:stable-slim"
steps:
@@ -41,7 +24,20 @@ jobs:
with:
node-version: 18
cache: 'npm'
- name: Prepare
run: npm --prefix static ci
- name: Build
run: npm --prefix static run build
- name: Build Frontend
run: npm --prefix static ci && npm --prefix static run build
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Prepare Backend
run: |
apt-get update
apt-get install --yes --no-install-recommends make gcc libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- name: Build Backend
run: make build-static
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
name: binary
path: service
retention-days: 5
+1
View File
@@ -0,0 +1 @@
service
+4 -1
View File
@@ -1,3 +1,6 @@
build:
go build -mod=vendor main.go
go build -mod=vendor -o service main.go
build-static:
go build -mod=vendor -tags=embed -o service main.go