From 3f50a39c2dc6c6e06269682f5989aa20ae4b576e Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 27 Nov 2023 12:58:51 +0800 Subject: [PATCH] chore: add sponsor badge. --- .github/FUNDING.yml | 9 +++++++++ .github/workflows/main.yml | 20 ++++++++++++++++---- README.md | 1 + package.json | 1 + 4 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 .github/FUNDING.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..716bbf0 --- /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/mocker-api +# 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/main.yml b/.github/workflows/main.yml index cc1e185..8a71dba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,17 +5,29 @@ on: push jobs: build: 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 install idoc@1.25.0 -g + - name: Create idoc config. + run: | + cat > idoc.yml << EOF + site: "Path Templater {{version}}" + menus: + Home: index.html + Sponsor: https://jaywcjlove.github.io/#/sponsor + EOF + + - run: npm install idoc@1.27.2 -g - run: idoc -s "Path Templater {{version}}" - run: npm run coverage - run: tree -I 'node_modules|.git|.github|src' -L 3 -a @@ -67,7 +79,7 @@ jobs: path: package.json unset: scripts,devDependencies - - run: npm publish --access public + - run: npm publish --access public --provenance continue-on-error: true env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -80,7 +92,7 @@ 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/path-templater@${{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/path-templater@${{steps.create_tag.outputs.versionNumber}}/file/README.md) Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/jaywcjlove/path-templater/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html diff --git a/README.md b/README.md index 3b44de0..e2343cd 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,7 @@ path-templater === +[![Buy me a coffee](https://img.shields.io/badge/Buy%20me%20a%20coffee-048754?logo=buymeacoffee)](https://jaywcjlove.github.io/#/sponsor) [![CI](https://github.com/jaywcjlove/path-templater/actions/workflows/main.yml/badge.svg)](https://github.com/jaywcjlove/path-templater/actions/workflows/main.yml) [![NPM Downloads](https://img.shields.io/npm/dm/path-templater.svg?style=flat)](https://www.npmjs.com/package/path-templater) [![NPM version](https://img.shields.io/npm/v/path-templater.svg?style=flat&label=path-templater)](https://npmjs.org/package/path-templater) diff --git a/package.json b/package.json index 284dfdc..0285c68 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "exports": "./lib/index.js", "types": "./lib/index.d.ts", "homepage": "https://jaywcjlove.github.io/path-templater", + "funding": "https://jaywcjlove.github.io/#/sponsor", "repository": { "type": "git", "url": "https://github.com/jaywcjlove/path-templater.git"