Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
ci(projects): add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
honghuangdc committed Dec 8, 2023
1 parent 4b48bd0 commit 86d683d
Show file tree
Hide file tree
Showing 6 changed files with 5,966 additions and 10 deletions.
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

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

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

- run: npx githublogen
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Install Dependencies
run: pnpm i

- name: PNPM build
run: pnpm run build

- name: Publish to NPM
run: pnpm -r publish --access public --no-git-checks
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NPM_CONFIG_PROVENANCE: true
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,3 @@ stats.html
*.njsproj
*.sln
*.sw?

package-lock.json
yarn.lock
pnpm-lock.yaml
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"lint": "eslint . --fix",
"prepare": "pnpm build && simple-git-hooks",
"publish-pkg": "pnpm -r publish --access public",
"release": "soy release && pnpm publish-pkg",
"release": "soy release",
"typecheck": "tsc --noEmit --skipLibCheck",
"update-pkg": "soy ncu"
},
Expand Down
Loading

0 comments on commit 86d683d

Please sign in to comment.