Skip to content

Commit

Permalink
[ci]Update publish next stdf
Browse files Browse the repository at this point in the history
  • Loading branch information
dufu1991 committed Dec 2, 2024
1 parent 3d05a01 commit 20f4ed8
Showing 1 changed file with 34 additions and 32 deletions.
66 changes: 34 additions & 32 deletions .github/workflows/publish-stdf-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,43 @@
name: PUBLISH NEXT STDF

on:
push:
branches:
- next
paths:
- 'packages/stdf/package.json'
push:
branches:
- next
paths:
- 'packages/stdf/package.json'

jobs:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
publish:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 20.x

# 将 README.md 和 LICENSE 复制到 packages/stdf 目录下
- name: Copy Files
run: |
cp README.md packages/stdf/README.md
cp LICENSE packages/stdf/LICENSE
# 将 README.md 和 LICENSE 复制到 packages/stdf 目录下
- name: Copy Files
run: |
cp README.md packages/stdf/README.md
cp LICENSE packages/stdf/LICENSE
# cd packages/stdf 目录下
# 发布 stdf 到 npm
- name: Publish
run: |
cd packages/stdf
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --tag=next --provenance
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# cd packages/stdf 目录下
# 发布 stdf 到 npm
- name: Publish
run: |
cd packages/stdf
npm install
npm run package
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --tag=next --provenance
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 20f4ed8

Please sign in to comment.