94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
on:
|
|
push:
|
|
tags-ignore: '*'
|
|
workflow-call: {}
|
|
|
|
jobs:
|
|
build-glibc:
|
|
name: Build backend-glibc
|
|
container:
|
|
image: rust:bullseye
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Build
|
|
run: cargo build --release
|
|
working-directory: backend
|
|
- name: Upload executable
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: backend-glibc
|
|
path: backend/target/release/backend_rust
|
|
build-muslc:
|
|
name: Build backend-muslc
|
|
contianer:
|
|
image: rust:alpine
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install dependencies
|
|
run: apk add pkgconf musl-dev
|
|
- name: Build
|
|
run: cargo build --release
|
|
working-directory: backend
|
|
- name: Upload executable
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: backend-muslc
|
|
path: backend/target/release/backend_rust
|
|
build-frontend:
|
|
name: Build frontend
|
|
container:
|
|
image: node:current-alpine
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install packages
|
|
run: yarn install --frozen-lockfile
|
|
working-directory: frontend
|
|
- name: Lint
|
|
run: yarn lint
|
|
working-directory: frontend
|
|
- name: Build
|
|
run: yarn build
|
|
working-directory: frontend
|
|
- name: Upload frontend
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: frontend
|
|
path: frontend/dist/*
|
|
package:
|
|
name: Package builds
|
|
container:
|
|
image: alpine:latest
|
|
needs: [build-glibc, build-muslc, build-frontend]
|
|
steps:
|
|
- name: Install packages
|
|
run: apk add tar xz
|
|
- run: mkdir static
|
|
- name: Download frontend
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: frontend
|
|
path: static
|
|
- name: Download backend-glibc
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: backend-glibc
|
|
path: server
|
|
- name: Package backend-glibc
|
|
run: tar -cvJf linux-x64-glibc.tar.xz server static
|
|
- name: Upload package-glibc
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: package-glibc
|
|
path: linux-x64-glibc.tar.xz
|
|
- name: Download backend-muslc
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: backend-muslc
|
|
path: server
|
|
- name: Package backend-muslc
|
|
run: tar -cvJf linux-x64-muslc.tar.xz server static
|
|
- name: Upload package-muslc
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: package-muslc
|
|
path: linux-x64-muslc.tar.xz |