Skip to content

Commit

Permalink
chore: deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hubert committed Mar 25, 2024
1 parent 8310811 commit 48f900b
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy

on:
# release:
# types: [published]
push: # push 到主分支自动 发布
branches: ['master']
paths-ignore: # 忽略一些不必要的文件
- '.gitignore'
- 'README.md'
- '.vscode/**'

jobs:
publish:
runs-on: ubuntu-latest
environment:
name: 'production'
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '16.14'
- name: Cache install
uses: actions/cache@v3
id: cache
with:
path: |
node_modules
.yarn/cache
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --mode=skip-build
- name: Authenticate with Registry
run: |
echo "registry=http://registry.npmjs.org/" >> .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
npm whoami
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish
run: lerna publish --yes
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Utils
公共工具库
公共工具库

[![Deploy](https://github.com/aceHubert//ace-util/actions/workflows/deploy.yml/badge.svg?branch=master)](https://github.com/aceHubert//ace-util/actions/workflows/deploy.yml)

[Core](./packages/core/README.md)
* [Core Documentation](./packages/core/README.md)

<br>
<br>
Expand Down

0 comments on commit 48f900b

Please sign in to comment.