feat: add middleware support and enhance store functionality #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Release and Publish | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- 'examples/**' | |
workflow_dispatch: | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org/' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build package | |
run: npm run build | |
- name: Get version from package.json | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@v1.3.1 | |
- name: Create GitHub Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ steps.package-version.outputs.current-version }} | |
release_name: Release v${{ steps.package-version.outputs.current-version }} | |
draft: false | |
prerelease: false | |
- name: Publish to NPM | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |