Skip to content

📃 docs: 文档修改 #71

📃 docs: 文档修改

📃 docs: 文档修改 #71

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/hexo-theme-async
cp ./README.md ./packages/hexo-theme-async
node ./scripts/publish
yarn lib:build
zip -r hexo-theme-async ./packages/hexo-theme-async
env:
RELEASE_VERSION: ${{ github.ref }}
- name: Beta Publish
if: ${{ contains(github.ref,'beta') }}
run: |
cd ./packages/hexo-theme-async
npm publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
if: ${{ !contains(github.ref,'beta') }}
run: |
cd ./packages/hexo-theme-async
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create Releases
uses: MaLuns/add-release@v1
with:
files: hexo-theme-async.zip
generate_release_notes: true
generate_release_notes_by_commit: true
prerelease: ${{ contains(github.ref,'beta') }}