mirror of
https://github.com/axios/axios.git
synced 2026-04-11 02:11:50 +08:00
* chore: add mise * chore: re-position ci * chore: move sponsors script * chore: fix yml * chore: yml * fix: yml * fix: yml * chore: tweak sponsor yml * chore: implement security suggestion * chore: update templates for issues and PRs and update all workflows * fix: copilot feedback * feat: always run CI * fix: linked resources * chore: cancel run if new run starts * feat: generate release notes with copilot
42 lines
1003 B
YAML
42 lines
1003 B
YAML
name: Publish package to NPM
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*.*.*"
|
|
|
|
permissions:
|
|
contents: write
|
|
id-token: write
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v6
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24.x
|
|
cache: npm
|
|
registry-url: "https://registry.npmjs.org"
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
- name: Build project
|
|
run: npm run build
|
|
- name: Publish to NPM
|
|
run: npm publish --provenance --access public
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
- name: Create release tag on GitHub
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
TAG: ${{ github.ref_name }}
|
|
run: |
|
|
gh release create "$TAG" \
|
|
--repo="$GITHUB_REPOSITORY" \
|
|
--title="${GITHUB_REPOSITORY#*/} ${TAG#v}" \
|
|
--generate-notes
|