Skip to content

不再打包中文文件名的包 #33

不再打包中文文件名的包

不再打包中文文件名的包 #33

Workflow file for this run

name: Build and Release
on:
push:
branches:
- main
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get the latest commit message
id: get_latest_commit
run: |
latest_commit=$(git log -1 --pretty=format:%s)
echo "latest_commit_message=$latest_commit" >> $GITHUB_ENV
- name: Read changelog
id: read_changelog
run: |
changelog=$(< CHANGELOG.md)
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Set up Node.js
if: startsWith(env.latest_commit_message, 'v')
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install dependencies
if: startsWith(env.latest_commit_message, 'v')
run: npm i
- name: npm run build
if: startsWith(env.latest_commit_message, 'v')
run: npm run build
- name: Release
if: startsWith(env.latest_commit_message, 'v')
uses: softprops/action-gh-release@v1
with:
tag_name: v1.21.50
name: Release ${{ env.latest_commit_message }}
body: ${{ env.CHANGELOG }}
draft: false
prerelease: false
files: build/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}