Skip to content

Commit

Permalink
ci: add release script
Browse files Browse the repository at this point in the history
ci: add `changelogithub` config
  • Loading branch information
xsjcTony committed Nov 28, 2023
1 parent 8786dd5 commit f588147
Show file tree
Hide file tree
Showing 4 changed files with 653 additions and 180 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: pnpm # or pnpm / yarn
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
Expand Down
43 changes: 43 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
permissions:
id-token: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- uses: pnpm/action-setup@v2 # Uncomment this if you're using pnpm

- name: Setup node
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm
registry-url: 'https://registry.npmjs.org'

- name: Generate changelog
run: npx changelogithub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install Dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Publish to npm
run: pnpm publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
23 changes: 11 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "unocss-preset-animations",
"version": "1.0.0-beta.8",
"description": "💅 An animation preset for UnoCSS, which adapts the tailwindcss-animate plugin",
"packageManager": "pnpm@8.10.5",
"packageManager": "pnpm@8.11.0",
"type": "module",
"author": "Aelita <https://github.com/xsjcTony>",
"license": "MIT",
Expand Down Expand Up @@ -36,36 +36,35 @@
"dist"
],
"scripts": {
"build": "pnpm typecheck && unbuild",
"release": "pnpm build && bumpp && pnpm publish",
"build": "unbuild",
"release": "pnpm test:ci && bumpp",
"typecheck": "tsc --noEmit",
"lint": "eslint .",
"test": "vitest",
"test:update": "vitest -u",
"test:ci": "pnpm typecheck && pnpm build && pnpm lint && pnpm test",
"docs:dev": "vitepress dev docs",
"docs:build": "vitepress build docs",
"docs:preview": "vitepress preview docs"
},
"devDependencies": {
"@aelita-dev/eslint-config": "1.0.0-beta.21",
"@iconify/json": "^2.2.144",
"@aelita-dev/eslint-config": "^1.0.0-beta.31",
"@iconify/json": "^2.2.149",
"@types/markdown-it": "^13.0.7",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@unocss/core": "^0.57.7",
"@unocss/preset-mini": "^0.57.7",
"@vue/language-server": "^1.8.22",
"bumpp": "^9.2.0",
"changelogithub": "^0.13.2",
"eslint": "^8.54.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.29.0",
"markdown-it": "^13.0.2",
"sass": "^1.69.5",
"typescript": "^5.3.2",
"unbuild": "^2.0.0",
"unocss": "^0.57.7",
"vitepress": "1.0.0-rc.29",
"vitepress": "1.0.0-rc.31",
"vitest": "^0.34.6",
"vue": "^3.3.8"
"vue": "^3.3.9"
},
"peerDependencies": {
"@unocss/preset-wind": ">= 0.56.0 < 1",
Expand Down
Loading

0 comments on commit f588147

Please sign in to comment.