Files
svelte-github-calendar/.github/workflows/publish.yaml

37 lines
797 B
YAML

name: Publish to NPM
on:
workflow_call:
jobs:
publish:
name: Publish to NPM
runs-on: ubuntu-latest
environment: npm
permissions:
id-token: write
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build package
run: pnpm build
- uses: simenandre/publish-with-pnpm@v2
with:
npm-auth-token: ${{ secrets.NPM_TOKEN }}