Skip to content

fix: 使用jkfujr的群友akagiyui提供的视频正则表达式 #2

fix: 使用jkfujr的群友akagiyui提供的视频正则表达式

fix: 使用jkfujr的群友akagiyui提供的视频正则表达式 #2

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Publish Node.js Package
on:
push:
tags: ["*"]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: Validate release tag
run: |
PACKAGE_VERSION=$(node -p "require('./package.json').version")
TAG=${GITHUB_REF_NAME#v}
if [ "$TAG" != "$PACKAGE_VERSION" ]; then
echo "Release tag ($TAG) does not match package.json version ($PACKAGE_VERSION)"
exit 1
else
echo "Release tag matches package.json version."
fi
- name: Install node modules
run: npm install
- name: Build project
run: npm run build
- name: Publish built files
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}