Skip to content

Commit

Permalink
build: update package manager and workflow
Browse files Browse the repository at this point in the history
This commit updates the package manager to pnpm@8.1.1 and adds a new workflow for releases triggered by git tags. The workflow uses actions/checkout@v3 to fetch the latest changes, pnpm/action-setup@v2 to install pnpm, and actions/setup-node@v3 to set the node version to 18.x and cache pnpm. Finally, it runs npx changelogithub to generate a changelog for the release, using the GITHUB_TOKEN secret.
  • Loading branch information
Mr.Mao committed Jun 1, 2023
1 parent f977b3a commit ada203e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Release

permissions:
contents: write

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: pnpm

- run: npx changelogithub
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "hairylib",
"version": "0.0.0",
"private": true,
"packageManager": "pnpm@8.1.1",
"description": "hairylib 使用 changeset 管理的多个模块包(monorepo)的工具项目。",
"author": "hairyf",
"license": "MIT",
Expand Down

0 comments on commit ada203e

Please sign in to comment.