mirror of
https://github.com/arthurfiorette/axios-cache-interceptor.git
synced 2026-02-01 14:32:40 +00:00
45 lines
969 B
YAML
45 lines
969 B
YAML
name: Publish to NPM
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
id-token: write # Required for OIDC
|
|
contents: read
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
environment:
|
|
name: NPM Registry
|
|
url: https://www.npmjs.com/package/axios-cache-interceptor
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ github.head_ref }}
|
|
fetch-depth: 0
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
|
|
- name: Setup node and restore cached dependencies
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version-file: '.nvmrc'
|
|
registry-url: 'https://registry.npmjs.org/'
|
|
cache: 'pnpm'
|
|
|
|
- name: Install packages
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Build
|
|
run: pnpm run build
|
|
|
|
- name: Publish to NPM # OIDC authentication
|
|
run: pnpm publish --access public --no-git-checks
|