43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: npm Publish
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '.github/workflows/npm-publish.yml'
|
|
- 'tsdown-lib.config.ts'
|
|
- 'scripts/workflow/build-routes.ts'
|
|
- 'lib/**'
|
|
|
|
permissions:
|
|
id-token: write # Required for OIDC
|
|
|
|
jobs:
|
|
build:
|
|
name: npm publish
|
|
if: github.repository == 'DIYgod/RSSHub'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
env:
|
|
HUSKY: 0
|
|
steps:
|
|
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
|
|
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
|
|
- uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
|
|
with:
|
|
node-version: lts/*
|
|
cache: 'pnpm'
|
|
registry-url: 'https://registry.npmjs.org'
|
|
- name: Install dependencies (pnpm)
|
|
run: pnpm i
|
|
- name: Run postinstall script for dependencies
|
|
run: pnpm rb
|
|
- name: Release
|
|
run: |
|
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git config --local user.name "github-actions[bot]"
|
|
pnpx version-from-git --allow-same-version --template 'master.short'
|
|
- name: Publish to npmjs
|
|
run: pnpm publish --access public --tag latest
|