mirror of
https://github.com/axios/axios.git
synced 2026-04-13 02:51:56 +08:00
33 lines
820 B
YAML
33 lines
820 B
YAML
name: Publish package to NPM
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v0.*.*'
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
environment: npm-publish
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
|
with:
|
|
node-version: 24.x
|
|
registry-url: 'https://registry.npmjs.org'
|
|
package-manager-cache: false
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Build project
|
|
run: npm run build
|
|
- name: Publish to NPM
|
|
run: npm publish --provenance --access public --tag old-version
|