From 4a6fa93d4c8936e89488117f571ae25b786c5900 Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 27 Nov 2023 09:01:50 +0800 Subject: [PATCH] chore: add sponsor badge. --- .github/FUNDING.yml | 12 ++++++------ .github/workflows/ci.yml | 32 +++++++++++++++++++++++++------- README.md | 1 + package.json | 1 + 4 files changed, 33 insertions(+), 13 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index abb4285..c317caa 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,9 +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/bannerjs -community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +# 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/bannerjs +# community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry custom: https://jaywcjlove.github.io/sponsor.html diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eaebed9..5c31a9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,27 +9,45 @@ env: jobs: build-deploy: runs-on: ubuntu-latest + permissions: + contents: write + id-token: write steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 registry-url: 'https://registry.npmjs.org' - - run: npm install - run: npm run build - run: npm run coverage - - run: npm i coverage-badges-cli markdown-to-html-cli -g - - run: coverage-badges - - run: markdown-to-html --output coverage/index.html + - run: npm install idoc@1.27.1 -g + - name: Create idoc config. + working-directory: core + run: | + cat > idoc.yml << EOF + site: "Bannerjs {{version}}" + menus: + Home: index.html + Sponsor: https://jaywcjlove.github.io/#/sponsor + EOF + + - run: idoc -s "Bannerjs {{version}}" + - run: cp -rp coverage/lcov-report ./dist + + - name: Create Coverage Badges + uses: jaywcjlove/coverage-badges-cli@main + with: + source: coverage/coverage-summary.json + output: dist/badges.svg - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./coverage + publish_dir: ./dist - run: npm install @jsdevtools/npm-publish -g - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json @@ -57,7 +75,7 @@ jobs: tag: ${{ steps.create_tag.outputs.version }} token: ${{ secrets.GITHUB_TOKEN }} body: | - [![](https://img.shields.io/badge/Open%20in-unpkg-blue)](https://uiwjs.github.io/npm-unpkg/#/pkg/bannerjs@${{steps.create_tag.outputs.versionNumbe}}/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/bannerjs@${{steps.create_tag.outputs.versionNumber}}/file/README.md) ```bash npm i bannerjs@${{steps.create_tag.outputs.versionNumber}} diff --git a/README.md b/README.md index e33cbdb..6823e65 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # bannerjs +[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![Build & Deploy](https://github.com/jaywcjlove/bannerjs/actions/workflows/ci.yml/badge.svg)](https://github.com/jaywcjlove/bannerjs/actions/workflows/ci.yml) [![Coverage Status](https://jaywcjlove.github.io/bannerjs/badges.svg)](https://jaywcjlove.github.io/bannerjs/lcov-report/) [![Repo Dependents](https://badgen.net/github/dependents-repo/jaywcjlove/bannerjs)](https://github.com/jaywcjlove/bannerjs/network/dependents) diff --git a/package.json b/package.json index 91d1a5c..f5ca3da 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "3.0.1", "description": "Get one-line/multi-line comment banner based on package.json.", "homepage": "https://jaywcjlove.github.io/bannerjs/", + "funding": "https://jaywcjlove.github.io/#/sponsor", "bin": { "bannerjs": "./bin/cli.js" },