Skip to content

Commit

Permalink
feat: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mustapha-ghlissi committed Jul 18, 2024
1 parent 1865315 commit 3e95506
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 1 deletion.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release & Publish to NPM
on: workflow_dispatch
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Configure Git User
run: |
git config --global user.name "Mustapha GHLISSI"
git config --global user.email "ghlissi.mustapha@gmail.com"
- name: Configure NPM
run: npm config set //registry.npmjs.org/:_authToken $NPM_PUBLISH_TOKEN
env:
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Release
run: npm run release --ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: End of release
run: echo "Success !"
2 changes: 2 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env sh
npx --no -- commitlint --edit $1
3 changes: 2 additions & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
npm test
#!/usr/bin/env sh
npx lint-staged

0 comments on commit 3e95506

Please sign in to comment.