2024-09-14 20:33:42 +03:00
|
|
|
name: Publish Package to npmjs
|
2024-09-14 20:40:12 +03:00
|
|
|
|
2024-09-14 20:33:42 +03:00
|
|
|
on:
|
2024-09-14 20:40:12 +03:00
|
|
|
workflow_dispatch:
|
2024-09-14 20:33:42 +03:00
|
|
|
push:
|
2024-09-14 20:40:12 +03:00
|
|
|
tags:
|
|
|
|
- '*'
|
2024-09-14 20:33:42 +03:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-and-publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
id-token: write
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
|
|
|
node-version: '20.x'
|
|
|
|
registry-url: 'https://registry.npmjs.org'
|
|
|
|
scope: '@mmote'
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
- name: Publish
|
|
|
|
run: npm publish --provenance --access public
|
|
|
|
env:
|
|
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|