-
Notifications
You must be signed in to change notification settings - Fork 20
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
e149ba1
commit 177cfe8
Showing
5 changed files
with
113 additions
and
29 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,28 @@ | ||
name: build | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
environment: test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- run: pnpm run lint | ||
- run: pnpm run prettier . --check | ||
|
||
- run: pnpm run build |
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,35 @@ | ||
name: Publish Any Commit | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
tags: | ||
- '!**' | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
permissions: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.number }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- run: corepack enable | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Build | ||
run: pnpm build | ||
- run: pnpx pkg-pr-new publish --compact --pnpm |
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 |
---|---|---|
@@ -1,33 +1,32 @@ | ||
name: Release CI | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
on: | ||
push: | ||
branches: [main, next, beta] | ||
pull_request: | ||
branches: [main, next, beta] | ||
|
||
jobs: | ||
release: | ||
publish: | ||
name: Publish to npm | ||
runs-on: ubuntu-latest | ||
environment: production | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Setup Node | ||
uses: actions/setup-node@v3 | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "npm" | ||
node-version: 20 | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Build lib | ||
run: npm run build | ||
- name: Jest run | ||
run: npm run test:unit | ||
- name: Cypress run | ||
run: npm run test:e2e | ||
- name: Release | ||
working-directory: lib | ||
run: pnpm install | ||
- name: Semantic Release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
run: npx semantic-release | ||
run: npx semantic-release@22.0.12 |
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,32 @@ | ||
name: Run Tests | ||
on: [push] | ||
|
||
env: | ||
PNPM_CACHE_FOLDER: .pnpm-store | ||
HUSKY: 0 # Bypass husky commit hook for CI | ||
|
||
jobs: | ||
test: | ||
name: Tests | ||
runs-on: ubuntu-latest | ||
environment: test | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: pnpm | ||
- name: Install dependencies | ||
run: pnpm install | ||
- name: Run Unit tests | ||
run: pnpm run test | ||
- name: Run E2E tests | ||
env: | ||
VITE_ACCESS_TOKEN: ${{ secrets.VITE_ACCESS_TOKEN }} | ||
VITE_OAUTH_TOKEN: ${{ secrets.VITE_OAUTH_TOKEN }} | ||
VITE_SPACE_ID: ${{ vars.VITE_SPACE_ID }} | ||
run: pnpm run build && pnpm run test:e2e |
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