add metadata & 0.1.0 #9
This file contains 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: Deploy npm | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '!*' | |
jobs: | |
build: | |
name: Build and Publish | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: 'https://registry.npmjs.org/' | |
always-auth: true | |
scope: '@slofp' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: latest | |
run_install: false | |
- name: Get pnpm store directory | |
shell: bash | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
- uses: actions/cache@v3 | |
name: Setup pnpm cache | |
with: | |
path: ${{ env.STORE_PATH }} | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
env: | |
NODE_ENV: dev | |
run: pnpm install --frozen-lockfile | |
- name: add tag | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | |
REPO: ${{github.repository}} | |
COMMIT: ${{github.sha}} | |
run: ./.github/workflows/addtag.sh | |
- name: publish | |
run: pnpm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |