Skip to content

chore(main): release 0.8.1 (#29) #75

chore(main): release 0.8.1 (#29)

chore(main): release 0.8.1 (#29) #75

on:
push:
branches:
- main
pull_request:
branches:
- main
# 允许你从 Actions 选项卡手动运行此工作流程
workflow_dispatch:
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
concurrency:
group: pages
cancel-in-progress: false
permissions:
contents: write
pull-requests: write
name: release-please
jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.output-release-created.outputs.release_created }}
steps:
- name: Check event type
id: check_event
run: |
echo "Event: ${{ toJson(env) }}"
- uses: googleapis/release-please-action@v4
id: release
name: release
with:
# this assumes that you have created a personal access token
# (PAT) and configured it as a GitHub action secret named
# `MY_RELEASE_PLEASE_TOKEN` (this secret name is not important).
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
# this is a built-in strategy in release-please, see "Action Inputs"
# for more options
release-type: node
- name: is published
id: is-published
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
run: |
echo "is_published"
- name: Output Release Created
id: output-release-created
run: |
release_created=${{ steps.release.outputs.release_created }}
b=1
echo "release_created={release_created}" >> "$GITHUB_OUTPUT"
echo "b={b}" >> "$GITHUB_OUTPUT"
check-release:
runs-on: ubuntu-latest
needs: release
steps:
- name: Check Release Created
id: check-release
run: |
echo "release: ${{ toJson(needs.release.outputs) }}"
deploy-doc:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [21]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Cache Node Modules
id: cache-node-modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-node-
- name: Setup Pnpm
id: setup-pnpm
uses: pnpm/action-setup@v3
- name: Install Dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: pnpm install
- name: Build Site
run: pnpm docs:build
- name: Deploy Site
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/.vitepress/dist
deploy_key: ${{ secrets.DEPLOY_KEY }}