Skip to content

Commit

Permalink
ci: add test and release
Browse files Browse the repository at this point in the history
  • Loading branch information
privatenumber committed May 17, 2023
1 parent 60d6f2f commit a4a5329
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 30 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/node.js.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
push:
branches: master

jobs:
release:
name: Release
runs-on: ubuntu-latest
timeout-minutes: 10

steps:

- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Test
run: pnpm test

- name: Release
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm dlx semantic-release
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Test
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]

jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'

- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: Lint
run: pnpm lint

- name: Test
run: pnpm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v12.18.0
v18.16.0

0 comments on commit a4a5329

Please sign in to comment.