Skip to content

chore(release): 0.0.3 #4

chore(release): 0.0.3

chore(release): 0.0.3 #4

Workflow file for this run

# see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
name: Publish Package to npmjs
on:
push:
tags:
- "v*.*.*"
# release:
# types: [created]
jobs:
npm-publish:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.com
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 8
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --no-frozen-lockfile --ignore-scripts
- name: Build and npm-publish
run: npm run release
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# - name: GitHub Pages action
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: ./docs
- name: Github Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: false
prerelease: false
# tag_name: ${{ github.ref }}
# name: Release ${{ github.ref }}
# body: TODO New Release.
# files: |
# ${{ secrets.ReleaseZipName }}.zip
# LICENSE