Skip to content

Commit

Permalink
chore: setup release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman-zishan committed Dec 28, 2023
1 parent dc7d0a8 commit f7b53d9
Show file tree
Hide file tree
Showing 4 changed files with 6,104 additions and 324 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,31 @@
name: "publish package to npm"
name: Release

on:
on:
push:
branches:
- main
- 'releases/**'

jobs:
build:
release:
runs-on: ubuntu-latest

steps:
- name: checkout
- name: Checkout Code
uses: actions/checkout@v2
- name: install dependencies

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16.x'

- name: Install Dependencies
run: npm install
- name: build package

- name: Build
run: npm run build
- name: publish
uses: codfish/semantic-release-action@v3

- name: Semantic Release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
15 changes: 15 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
Loading

0 comments on commit f7b53d9

Please sign in to comment.