From 1b2763d3f8729efc0b4b429cd3f5141abf4f1553 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Wed, 29 Nov 2023 22:10:10 +0800 Subject: [PATCH] chore: add sponsor badge. --- .github/FUNDING.yml | 9 +++++++++ .github/workflows/ci.yml | 27 +++++++++++++++------------ README.md | 1 + package.json | 1 + 4 files changed, 26 insertions(+), 12 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..021de74 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,9 @@ +# These are supported funding model platforms + +# github: [jaywcjlove] +# patreon: # Replace with a single Patreon username +# open_collective: # Replace with a single Open Collective username +# ko_fi: # Replace with a single Ko-fi username +# tidelift: #npm/xxxx +# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +custom: https://jaywcjlove.github.io/#/sponsor diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 532f21b..c945cb3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,12 +6,13 @@ on: jobs: build-deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: - node-version: 14 + node-version: 18 + registry-url: 'https://registry.npmjs.org' - run: npm install - run: npm run test @@ -34,13 +35,13 @@ jobs: - name: Create Tag id: create_tag - uses: jaywcjlove/create-tag-action@v1.3.6 + uses: jaywcjlove/create-tag-action@main with: package-path: ./package.json - name: get tag version id: tag_version - uses: jaywcjlove/changelog-generator@v1.5.3 + uses: jaywcjlove/changelog-generator@main - name: Deploy uses: peaceiris/actions-gh-pages@v3 @@ -53,7 +54,7 @@ jobs: - name: Generate Changelog id: changelog - uses: jaywcjlove/changelog-generator@v1.5.3 + uses: jaywcjlove/changelog-generator@main with: head-ref: ${{steps.create_tag.outputs.version}} filter-author: (小弟调调™|Renovate Bot) @@ -67,14 +68,16 @@ jobs: name: ${{ steps.create_tag.outputs.version }} tag: ${{ steps.create_tag.outputs.version }} body: | - [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/reader-stat@${{steps.create_tag.outputs.versionNumber}}/file/README.md) + [![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/reader-stat@${{steps.create_tag.outputs.versionNumber}}/file/README.md) Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/reader-stat/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html Comparing Changes: ${{ steps.changelog.outputs.compareurl }} ${{ steps.changelog.outputs.changelog }} - - uses: JS-DevTools/npm-publish@v1 - with: - token: ${{ secrets.NPM_TOKEN }} - package: ./package.json + + - name: 📦 reader-stat publish to NPM + run: npm publish --access public --provenance + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/README.md b/README.md index 2726eea..61b41f3 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ reader-stat === +[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![Downloads](https://img.shields.io/npm/dm/reader-stat.svg?style=flat)](https://www.npmjs.com/package/reader-stat) [![NPM version](https://img.shields.io/npm/v/reader-stat.svg?style=flat)](https://npmjs.org/package/reader-stat) [![Build](https://github.com/jaywcjlove/reader-stat/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/reader-stat/actions/workflows/ci.yml) diff --git a/package.json b/package.json index 2e6df57..e979ebc 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "reader-stat", "version": "2.2.0", "description": "Reads the directory files and adds the stat info.", + "funding": "https://jaywcjlove.github.io/#/sponsor", "main": "index.js", "typings": "index.d.ts", "scripts": {