fix(ci): simple release 也构建前端
This commit is contained in:
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@@ -48,7 +48,6 @@ jobs:
|
|||||||
|
|
||||||
build-frontend:
|
build-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.inputs.simple_release != 'true' }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -77,8 +76,6 @@ jobs:
|
|||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [update-version, build-frontend]
|
needs: [update-version, build-frontend]
|
||||||
# 等待 build-frontend 完成(除非是 simple_release 则跳过检查)
|
|
||||||
if: ${{ always() && needs.update-version.result == 'success' && (github.event.inputs.simple_release == 'true' || needs.build-frontend.result == 'success') }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -94,7 +91,6 @@ jobs:
|
|||||||
path: backend/cmd/server/
|
path: backend/cmd/server/
|
||||||
|
|
||||||
- name: Download frontend artifact
|
- name: Download frontend artifact
|
||||||
if: ${{ github.event.inputs.simple_release != 'true' }}
|
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: frontend-dist
|
name: frontend-dist
|
||||||
|
|||||||
@@ -12,9 +12,8 @@ builds:
|
|||||||
dir: backend
|
dir: backend
|
||||||
main: ./cmd/server
|
main: ./cmd/server
|
||||||
binary: sub2api
|
binary: sub2api
|
||||||
# 不嵌入前端,使用独立部署模式
|
flags:
|
||||||
# flags:
|
- -tags=embed
|
||||||
# - -tags=embed
|
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
goos:
|
goos:
|
||||||
|
|||||||
Reference in New Issue
Block a user