merge(#22): 修复终端颜色和字体 #30
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: "Build Action" | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Build-NextNapCatWebUI: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone Main Repository | |
uses: actions/checkout@v4 | |
with: | |
ref: main | |
token: ${{ secrets.TOKEN }} | |
- name: Set version | |
run: | | |
commit_sha=$(git rev-parse --short HEAD) | |
version=$(jq -r '.version' package.json) | |
echo "version=${version}" >> $GITHUB_ENV | |
- name: Use Node.js 20.X | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.X | |
- name: Build NextNapCatWebUI | |
run: | | |
npm install | |
npm run webui:build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: NextNapCatWebUI | |
path: dist | |
- name: Install zip | |
run: sudo apt-get install -y zip | |
- name: Compress subdirectories | |
run: | | |
zip -q -r NextNapCatWebUI.zip dist/* | |
- name: Create Release and Upload Artifacts | |
if: contains(github.event.head_commit.message, 'release') | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: NextNapCatWebUI-v${{ env.version }} | |
tag_name: v${{ env.version }} | |
token: ${{ secrets.TOKEN }} | |
files: | | |
NextNapCatWebUI.zip |