-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: publish new version to npm via ci
Also, add the exported type structure. PR: #198
- Loading branch information
1 parent
465feab
commit 15041be
Showing
3 changed files
with
57 additions
and
72 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
env: | ||
lockfile: pnpm-lock.yaml | ||
node_version: "18" | ||
pnpm_version: "8" | ||
|
||
jobs: | ||
npm-publish: | ||
name: Publish to NPM | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- uses: pnpm/action-setup@v2 | ||
name: Install PNPM | ||
id: pnpm-install | ||
with: | ||
version: ${{ env.pnpm_version }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
cache: pnpm | ||
cache-dependency-path: ${{ env.lockfile }} | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run ESLint | ||
run: pnpm run lint:ci | ||
|
||
- name: Run tests | ||
run: pnpm run test | ||
|
||
- name: Run tsc | ||
run: node_modules/.bin/tsc | ||
|
||
- name: Build dist | ||
run: pnpm run build | ||
|
||
- name: Publish to npm | ||
id: publish | ||
run: | | ||
pnpm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }} | ||
pnpm publish --access public --no-git-checks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters