Skip to content

Commit

Permalink
ci(CI&CD): 🎡 ci
Browse files Browse the repository at this point in the history
  • Loading branch information
guotingchao committed Apr 14, 2024
1 parent e0850c7 commit 05c0c12
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 33 deletions.
58 changes: 26 additions & 32 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,45 @@
name: CI
# 整个流程的名字
name: Release

on:
push:
branches:
- main
- release/*
defaults:
run:
shell: bash

jobs:
build:
changelog:
name: Changelog PR or Release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/checkout@v3
- name: Setup PNPM
uses: pnpm/[email protected]
with:
version: ^8.6.11

- name: Setup Node.js 20.10.0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20.10.0
cache: 'pnpm'

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install Dependencies
run: bun install
- name: Install dependencies
run: pnpm install

- name: Build
run: |
bun run build
- name: Build Packages
run: pnpm run build

- name: Release
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with: |
bun run changeset version
bun run changeset publish
with:
version: pnpm run version
publish: pnpm changeset publish
commit: '[ci] release'
title: '[ci] release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Push changes
# run: |
# git config --local user.email "[email protected]"
# git config --local user.name "GitHub Action Bot"
# git add CHANGLOG.md
# bun run commit:changelog

# - name: Publish
# run: |
# bun run changeset version
# bun run changeset publish
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Binary file removed bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"release:version": "bumpp package.json packages/*/package.json --execute=\"pnpm release:changelog\" --commit \"build: :package: publish v%s\" --all",
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
"ci:publish": "pnpm publish -r",
"build": "nest build",
"test": "jest",
"test:watch": "jest --watch",
Expand Down

0 comments on commit 05c0c12

Please sign in to comment.