Skip to content

Commit

Permalink
chore: add sponsor badge.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 27, 2023
1 parent e8a6c99 commit 4a6fa93
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 13 deletions.
12 changes: 6 additions & 6 deletions .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
32 changes: 25 additions & 7 deletions .github/workflows/ci.yml
Expand Up @@ -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
Expand Down Expand Up @@ -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}}
Expand Down
1 change: 1 addition & 0 deletions 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)
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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"
},
Expand Down

0 comments on commit 4a6fa93

Please sign in to comment.