Skip to content

Commit

Permalink
feat: setup semantic-release, remove useless logs
Browse files Browse the repository at this point in the history
  • Loading branch information
d0kur0 committed Sep 21, 2023
1 parent fdf4d30 commit 8490896
Show file tree
Hide file tree
Showing 9 changed files with 12,127 additions and 37 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
name: checks
on: [pull_request, workflow_dispatch]
name: Tests & Lint
on: [pull_request, workflow_dispatch, push]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm run test
Original file line number Diff line number Diff line change
@@ -1,43 +1,45 @@
name: Node.js Package
name: release npm package
on:
release:
types: [created]
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm run lint

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "18.x"
- run: npm install
- run: npm run build
- run: npm run test

build:
release:
needs:
- test
- lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "16.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"
- run: npm install
- run: npm run build
- run: npm publish
- run: npx semantic-release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
node_modules
.idea
yarn.lock
package-lock.json
dist
yarn-error.log
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ?
Loading

0 comments on commit 8490896

Please sign in to comment.