build static

This commit is contained in:
kaedwen committed 2023-07-08 11:57:11 +02:00
1 parent 4d7b7dfc2e
commit e939e4cc41
3 files changed
+22 -22

No files matched your search

+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 # A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs: jobs:
build-backend: 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 runs-on: ubuntu-latest
container: "debian:stable-slim" container: "debian:stable-slim"
steps: steps:
@@ -41,7 +24,20 @@ jobs:
with: with:
node-version: 18 node-version: 18
cache: 'npm' cache: 'npm'
- name: Prepare - name: Build Frontend
run: npm --prefix static ci run: npm --prefix static ci && npm --prefix static run build
- name: Build - uses: actions/setup-go@v4
run: npm --prefix static run build 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: 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