Skip to content

Commit

Permalink
build static
Browse files Browse the repository at this point in the history
  • Loading branch information
kaedwen committed Jul 8, 2023
1 parent 4d7b7df commit e939e4c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
32 changes: 14 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,24 @@ jobs:
container: "debian:stable-slim"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Build Frontend
run: npm --prefix static ci && npm --prefix static run build
- uses: actions/setup-go@v4
with:
go-version: 'stable'
- name: Prepare
- 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
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:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
- name: Build Backend
run: make build-static
- name: Archive artifacts
uses: actions/upload-artifact@v3
with:
node-version: 18
cache: 'npm'
- name: Prepare
run: npm --prefix static ci
- name: Build
run: npm --prefix static run build
name: binary
path: service
retention-days: 5
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
service
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e939e4c

Please sign in to comment.