Skip to content

Commit

Permalink
chore: setup actions
Browse files Browse the repository at this point in the history
  • Loading branch information
arthur-er committed Aug 30, 2023
1 parent b9de048 commit 9323390
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 7 deletions.
22 changes: 15 additions & 7 deletions .github/workflows/test.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,29 @@
name: test
name: CI
on:
- push
- pull_request
pull_request:
branches: ['main']
jobs:
linux:
lint-and-test:
name: Lint and test
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 17.x
- 16.15.1
- 18.x
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install
run: npm install
run: pnpm install
- name: lint
run: pnpm lint
- name: Run tests
run: npm test
run: pnpm test
26 changes: 26 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Release
on:
push:
branches: ['main']
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v3
with:
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 9323390

Please sign in to comment.