ci: add workflows

This commit is contained in:
pengzhanbo 2024-07-17 00:45:15 +08:00
parent a79fcf9cd4
commit e56ea81f03
2 changed files with 61 additions and 0 deletions

38
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Linter
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Restore Build Result
uses: actions/download-artifact@v4
with:
name: build-result
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install deps
run: pnpm install --frozen-lockfile
- name: Linter
run: |
pnpm run lint
pnpm run lint:css

23
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Add Release Tag
on:
push:
tags:
- v*
jobs:
release:
if: github.repository == 'pengzhanbo/vuepress-theme-plume'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20.x
- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}