Skip to content

📃 docs: 文档更新 #2

📃 docs: 文档更新

📃 docs: 文档更新 #2

Workflow file for this run

name: NPM Publish
on:
push:
tags:
- "v*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
cache: yarn
- run: yarn install --frozen-lockfile
- name: Build
run: |
cp ./README_zh-CN.md ./packages/vitepress-theme-async
cp ./README.md ./packages/vitepress-theme-async
node ./scripts/publish.mjs
zip -r vitepress-theme-async ./packages/vitepress-theme-async
env:
RELEASE_VERSION: ${{ github.ref }}
- name: Beta Publish
if: ${{ contains(github.ref,'beta') }}
run: |
cd ./packages/vitepress-theme-async
npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
if: ${{ !contains(github.ref,'beta') }}
run: |
cd ./packages/vitepress-theme-async
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Releases
uses: MaLuns/add-release@v1
with:
files: vitepress-theme-async.zip
generate_release_notes: true
generate_release_notes_by_commit: true
prerelease: ${{ contains(github.ref,'beta') }}