Skip to content

Commit

Permalink
GitHub CICD (#22)
Browse files Browse the repository at this point in the history
* feat(ci): add format check pipeline

* feat(ci): run format locally

* chore(ci): add publish and format workflows

* chore(ci): test workflow is working

* fix(ci): run format script
  • Loading branch information
ab7z authored Aug 13, 2024
1 parent 8b1c3ce commit ccf6d5e
Show file tree
Hide file tree
Showing 6 changed files with 3,290 additions and 10 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/format-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: format-lint.yaml

on:
pull_request:
branches:
- master

jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm ci
- name: Prettier check
run: npm run format:check
- name: Lint the code
run: npm run lint
22 changes: 22 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish Package to npmjs

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.idea
lib
node_modules
package-lock.json
Loading

0 comments on commit ccf6d5e

Please sign in to comment.