chore: v1.9.0 #78
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GoReleaser | |
on: | |
push: | |
tags: | |
- 'v*' | |
jobs: | |
goreleaser: | |
runs-on: ubuntu-20.04 | |
steps: | |
- | |
name: Checkout | |
uses: actions/checkout@v2 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '18.14.1' | |
- | |
name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.17 | |
- name: build public files | |
run: | | |
echo "清空原有数据" | |
rm -rf ./public | |
mkdir -p public/admin | |
echo '构建用户页面' | |
cd ui/website && yarn install && yarn build && cd ../../ | |
cp -r ui/website/build/* public/ | |
echo '构建管理页面' | |
cd ui/admin && yarn install && yarn build && cd ../../ | |
cp -r ui/admin/dist/* public/admin/ | |
sed -i 's/\/assets/\/admin\/assets/g' public/admin/index.html | |
echo '构建前端数据完成' | |
ls public/static | |
- | |
name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v2 | |
with: | |
distribution: goreleaser | |
version: v1.18.2 | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |