fix version checking bug #13
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: release | |
on: | |
push: | |
# Pattern matched against refs/tags | |
tags: | |
- '**' # Push events to every tag including hierarchical tags like v1.0/beta | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
projName: webui | |
verStr: '1.0.x' | |
steps: | |
- name: Checkout main | |
uses: actions/checkout@v4 | |
- name: Setup node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install packages | |
run: npm install | |
- name: Build project | |
run: npm run build | |
- name: Create assets | |
uses: vimtor/[email protected] | |
with: | |
files: dist/ | |
dest: ${{ env.projName }}.zip | |
- name: Calc md5sum | |
run: | | |
echo CHECKSUM="$(md5sum ${projName}.zip | awk '{ print $1 }')" >> "$GITHUB_ENV" | |
- name: Publish Release | |
uses: ncipollo/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: 'v${{ env.verStr }}' | |
tag: ${{ env.verStr }} | |
body: | | |
#### 变化: | |
* 变化1 | |
#### MD5: | |
${{ env.projName }}.zip (${{ env.CHECKSUM }}) | |
draft: true | |
prerelease: false | |
artifacts: "${{ env.projName }}.zip" |