name: publish on: push: branches: - master paths: - 'lib/**' permissions: contents: read jobs: build: name: npm publish if: github.repository == 'DIYgod/RSSHub' runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 16 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 }}