Skip to content

Commit

Permalink
feat: automatically publish to npm
Browse files Browse the repository at this point in the history
  • Loading branch information
erelsgl committed Jun 19, 2023
1 parent 26b77ee commit c3cd44f
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,23 @@
name: Semantic Release

on:
push:
branches: [ master ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
- run: |
npm ci
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 15 additions & 0 deletions .releaserc
@@ -0,0 +1,15 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/npm",
"@semantic-release/github",
["@semantic-release/git", {
"assets": ["package.json", "package-lock.json", "LICENSE", "README.md", "CHANGELOG.md"],
"message": "chore: release ${nextRelease.version} :tada: [skip ci]\n\n${nextRelease.notes}"
}]
]
}

0 comments on commit c3cd44f

Please sign in to comment.