1
0
mirror of synced 2026-02-04 05:51:32 +08:00
Files
cook/.github/workflows/release.yml
2025-10-07 18:51:48 +08:00

54 lines
1.3 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v3
# after pnpm
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: lts/*
registry-url: https://registry.npmjs.org/
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
# deploy to edgeone
# see https://edgeone.ai/zh/document/180255338996572160?product=edgedeveloperplatform
- name: Deploy to EdgeOne Pages
run: npx edgeone pages deploy dist -n cook-yunyoujun-cn -t ${{ secrets.EDGEONE_API_TOKEN }}
env:
EDGEONE_API_TOKEN: ${{ secrets.EDGEONE_API_TOKEN }}
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist
- uses: actions/upload-artifact@v4
with:
name: Cook Dist
path: dist
- run: npx changelogithub # or changelogithub@0.12 if ensure the stable result
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}