Files
RSSHub/.github/workflows/npm-publish.yml
T
dependabot[bot] 1fbda8fc72 chore(deps): bump actions/checkout from 2 to 3 (#9230)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

[skip ci]
2022-03-01 12:04:46 -10:00

31 lines
750 B
YAML

name: publish
on:
push:
branches:
- master
paths:
- 'lib/**'
jobs:
build:
name: npm publish
if: github.repository == 'DIYgod/RSSHub'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3.0.0
with:
node-version: '14'
cache: 'yarn'
registry-url: 'https://registry.npmjs.org'
- name: Release
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
npx version-from-git --allow-same-version --template 'master.short'
- name: Publish to npmjs
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}