Skip to content

v1.2.0

v1.2.0 #11

Workflow file for this run

name: build-go-binary
on:
release:
types: [created] # 表示在创建新的 Release 时触发
jobs:
build-go-binary:
runs-on: ubuntu-latest
steps:
- name: Node Setup
uses: actions/setup-node@v3
with:
node-version: latest
- name: Pnpm Setup
uses: pnpm/action-setup@v2
with:
version: 8
- name: Go setup
uses: actions/setup-go@v4
with:
go-version: 'stable'
- uses: actions/checkout@v3
- name: build front src
run: |
git clone https://github.com/jinzhongjia/newMovie.git --depth=1 src/front
cd src/front;pnpm install;pnpm build
cd ..
cd ..
cp -r src/front/dist/ dist/front
git clone https://github.com/jinzhongjia/newMovieAdmin.git --depth=1 src/admin
cd src/admin;pnpm install;pnpm build
cd ..
cd ..
cp -r src/admin/dist/ dist/admin
- name: build
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o movie-linux
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o movie-window.exe
- name: Upload assets
uses: softprops/action-gh-release@v1
with:
prerelease: false
files: |
conf.ini
movie-linux
movie-window.exe