From 0b6d0977ac54fe1954307427c26f2c08220a2106 Mon Sep 17 00:00:00 2001 From: naiba Date: Thu, 24 Oct 2024 22:35:26 +0800 Subject: [PATCH] feat: update admin-dist --- .github/workflows/release.yml | 9 ++++----- .github/workflows/test.yml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2fb9daf..fdb0712 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,11 +40,10 @@ jobs: with: go-version: "1.23.x" - - name: bootstrap + - name: generate swagger docs run: | go install github.com/swaggo/swag/cmd/swag@latest - ls -al `go env GOPATH`/bin/ - `go env GOPATH`/bin/swag init --pd -d . -g ./cmd/dashboard/main.go -o ./cmd/dashboard/docs --parseGoList=false + swag init --pd -d . -g ./cmd/dashboard/main.go -o ./cmd/dashboard/docs --parseGoList=false - name: Build with tag if: contains(github.ref, 'refs/tags/') @@ -134,7 +133,7 @@ jobs: - name: prepare frontend dists run: | - wget https://github.com/nezhahq/nezha-dashboard/releases/download/v0.0.2/dist.zip + wget https://github.com/nezhahq/nezha-dashboard/releases/download/v0.0.3/dist.zip unzip dist.zip mv dist admin-dist @@ -153,7 +152,7 @@ jobs: run: | export TAG_NAME=$(echo ${GITHUB_REF#refs/tags/}) if [ -z "$TAG_NAME" ]; then - export TAG_NAME=$(echo ${GITHUB_REF#refs/heads/}) + export TAG_NAME=$(echo ${GITHUB_HEAD_REF}) fi echo "tag=$TAG_NAME" >> $GITHUB_OUTPUT id: extract_branch diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 79f2d2e..8f000e2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: with: go-version: "1.23.x" - - name: bootstrap + - name: generate swagger docs run: | go install github.com/swaggo/swag/cmd/swag@latest swag init --pd -d . -g ./cmd/dashboard/main.go -o ./cmd/dashboard/docs --parseGoList=false