Skip to content

Commit

Permalink
chore: add build, release automation, ci
Browse files Browse the repository at this point in the history
  • Loading branch information
kettanaito committed Dec 9, 2024
1 parent 60633d7 commit c7a083d
Show file tree
Hide file tree
Showing 9 changed files with 1,514 additions and 45 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches:
- main
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Tests
run: npm test
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: release

on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch:

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_ADMIN_TOKEN }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
always-auth: true
registry-url: https://registry.npmjs.org

- name: Setup Git
run: |
git config --local user.name "Artem Zakharchenko"
git config --local user.email "[email protected]"
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Tests
run: npm test

- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.DS_Store
/node_modules
/build
/build
*.tsbuildinfo
Loading

0 comments on commit c7a083d

Please sign in to comment.