Skip to content

Commit

Permalink
feat(ci): include frontend dist files in release (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode authored May 9, 2024
1 parent 9246408 commit 5dea08a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,5 @@ release:
name: Artalk
prerelease: auto
draft: false
extra_files:
- glob: ./local/release_includes/*
13 changes: 11 additions & 2 deletions scripts/build-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ fi
pnpm install --frozen-lockfile
pnpm build:all

## dist
## dist folders
DIST_DIR="./public/dist"
SIDEBAR_DIR="./public/sidebar"

## dist
rm -rf ${DIST_DIR} && mkdir -p ${DIST_DIR}
cp -r ./ui/artalk/dist/{Artalk.css,Artalk.js} ${DIST_DIR}
cp -r ./ui/artalk/dist/{ArtalkLite.css,ArtalkLite.js} ${DIST_DIR}
Expand All @@ -29,7 +32,6 @@ mkdir -p ${I18N_DIR}
cp -r ./ui/artalk/dist/i18n/*.js ${I18N_DIR}

## sidebar
SIDEBAR_DIR="./public/sidebar"
rm -rf ${SIDEBAR_DIR} && mkdir -p ${SIDEBAR_DIR}
cp -r ./ui/artalk-sidebar/dist/* ${SIDEBAR_DIR}

Expand All @@ -39,3 +41,10 @@ mkdir -p ${PLUGIN_DIR}

pnpm build:auth
cp -r ./ui/plugin-auth/dist/artalk-plugin-auth.js ${PLUGIN_DIR}

## create tarball for release
mkdir -p ./local/artalk_ui
cp -r ${DIST_DIR} ${SIDEBAR_DIR} ./local/artalk_ui

mkdir -p ./local/release_includes
tar -czf ./local/release_includes/artalk_ui.tar.gz -C ./local artalk_ui

0 comments on commit 5dea08a

Please sign in to comment.