2024-04-19 08:34:21 +08:00
|
|
|
name: Release Workflow
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'release-*'
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
CI:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: node:20
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: config registry
|
|
|
|
run: npm config set registry https://npm.daoyoucloud.com/
|
|
|
|
- name: install pnpm
|
|
|
|
uses: pnpm/action-setup@v3
|
|
|
|
with:
|
|
|
|
standalone: true
|
2024-04-19 13:56:55 +08:00
|
|
|
- name: Get pnpm store directory
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
|
|
|
- name: Setup pnpm cache
|
|
|
|
uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: ${{ env.STORE_PATH }}
|
|
|
|
key: pnpm-store
|
2024-04-19 08:34:21 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: pnpm install
|
|
|
|
- name: Build
|
|
|
|
run: pnpm build:p
|
2024-04-19 13:56:55 +08:00
|
|
|
- name: show status
|
|
|
|
run: git status
|
2024-04-19 08:34:21 +08:00
|
|
|
- name: publish
|
|
|
|
run: pnpm publish -r --registry=https://npm.daoyoucloud.com --publish-branch ${{ gitea.ref }}
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|