add github CI build.yml
This commit is contained in:
68
.github/workflows/build.yml
vendored
Normal file
68
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
# Controls when the workflow will run
|
||||||
|
on:
|
||||||
|
# Triggers the workflow on push or pull request events but only for the "master" branch
|
||||||
|
push:
|
||||||
|
branches: [ "master" ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ "master" ]
|
||||||
|
|
||||||
|
# Allows you to run this workflow manually from the Actions tab
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
build-backend-linux:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
- name: Build linux backend
|
||||||
|
run: |
|
||||||
|
make linux
|
||||||
|
- name: Upload linux backend
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: backend-linux
|
||||||
|
path: |
|
||||||
|
msw-open-music
|
||||||
|
config.json
|
||||||
|
build-backend-windows:
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: 1.18
|
||||||
|
- name: Build windows backend
|
||||||
|
run: |
|
||||||
|
go build -v
|
||||||
|
- name: Upload linux backend
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: backend-windows
|
||||||
|
path: |
|
||||||
|
msw-open-music.exe
|
||||||
|
config.json
|
||||||
|
build-frontend-web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CI: false
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 16
|
||||||
|
- name: Build web front end
|
||||||
|
run: |
|
||||||
|
make web
|
||||||
|
- name: upload packaged front end
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: frontend-web
|
||||||
|
path: web/build
|
||||||
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
|||||||
dist:
|
web:
|
||||||
cd web && npm install
|
cd web && npm install
|
||||||
cd web && npm run build
|
cd web && npm run build
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# MSW Open Music Project
|
# MSW Open Music Project
|
||||||
|
|
||||||
|
[](https://github.com/heimoshuiyu/msw-open-music/actions/workflows/build.yml)
|
||||||
|
|
||||||
## Introduction
|
## Introduction
|
||||||
|
|
||||||
A light weight personal music streaming platform.
|
A light weight personal music streaming platform.
|
||||||
|
|||||||
Reference in New Issue
Block a user