-
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.
- Loading branch information
1 parent
97f19f9
commit da4ea7b
Showing
2 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
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,39 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: [18, 20, 22] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set node version to ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install & Build | ||
run: | | ||
pnpm install | ||
pnpm build | ||
- name: Typecheck | ||
run: pnpm typecheck | ||
|
||
- name: Test | ||
run: pnpm test |
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,58 @@ | ||
name: Publish | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release-type: | ||
type: choice | ||
description: Type of the release | ||
options: | ||
- patch | ||
- minor | ||
- major | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v2 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
registry-url: "https://registry.npmjs.org" | ||
|
||
- name: Install & Build | ||
run: | | ||
pnpm install | ||
pnpm build | ||
- name: Typecheck | ||
run: pnpm typecheck | ||
|
||
- name: Test | ||
run: pnpm test | ||
|
||
- name: Configure github-actions git | ||
run: | | ||
git config --global user.name 'github-actions' | ||
git config --global user.email 'github-actions@users.noreply.github.com' | ||
- name: Bump version | ||
run: pnpm version ${{ github.event.inputs.release-type }} | ||
|
||
- name: Push release tag | ||
run: git push origin main --follow-tags | ||
|
||
- name: Publish to npm | ||
run: pnpm publish --provenance | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |