Skip to content

Commit

Permalink
ci: semantic release (#10)
Browse files Browse the repository at this point in the history
Adding husky and conventional commit too to support semantic release.
Introduced a github action to automatically deploy.
  • Loading branch information
vacas5 authored Jun 13, 2024
1 parent 2552eae commit da72774
Show file tree
Hide file tree
Showing 7 changed files with 10,534 additions and 1,726 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Continuous Delivery
env:
HUSKY: 0
on:
workflow_run:
workflows: ['Tests']
types: [completed]
branches:
- master
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
2 changes: 0 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
name: Tests
env:
UNSPLASH_APP_ID: ${{ secrets.UNSPLASH }}
on:
push:
branches: [master]
Expand Down
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm test
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ['@commitlint/config-conventional'] };
Loading

0 comments on commit da72774

Please sign in to comment.