Skip to content

chore: add .github/FUNDING.yml #26

chore: add .github/FUNDING.yml

chore: add .github/FUNDING.yml #26

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Look Changelog
uses: jaywcjlove/changelog-generator@main
with:
filter-author: (小弟调调™|Renovate Bot|renovate-bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- run: npm install
- run: npm run build
- run: npm run coverage
- run: npm run doc
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm run build
- run: npm run coverage
- run: npm run bundle
- run: npm run bundle:min
- run: npm install
- run: npm run doc
- name: Generate Contributors Images
uses: jaywcjlove/github-action-contributors@main
with:
filter-author: (renovate\[bot\]|renovate-bot|dependabot\[bot\])
output: website/build/CONTRIBUTORS.svg
avatarSize: 42
- name: Create Coverage Badges
uses: jaywcjlove/coverage-badges-cli@main
with:
output: website/build/badges.svg
- run: cp -rp coverage website/build
- run: cp -rp core/dist/*.js website/build
- run: cp -rp core/dist/*.ts website/build
- run: cp -rp core/dist/*.map website/build
- run: cp core/dist/index.html website/build/example.html
- name: Create watermark-example.svg
working-directory: website/build
run: |
cat > watermark-example.svg << EOF
<svg xmlns="http://www.w3.org/2000/svg" width="165" height="31" viewBox="0 0 165 31"><g fill="#C6C6C6"><path d="M6.84489366,0 L13.6897873,5.29843734 L11.0752706,13.871489 L2.61451673,13.871489 L0,5.29843734 L6.84489366,0 Z M6.84489366,31 L0,25.7015626 L2.61451673,17.1285109 L11.0752706,17.1285109 L13.6897873,25.7015626 L6.84489366,31 Z M26,20.1002309 L17.9532181,22.8855983 L12.9799064,15.592996 L17.9530127,8.30055254 L26,11.086177 L26,20.1002309 Z" opacity=".236"/><polygon points="34 6 39.027 23 41.896 23 45.451 9.881 45.549 9.881 49.104 23 51.949 23 57 6 53.984 6 50.576 19.238 50.478 19.238 46.898 6 44.102 6 40.522 19.238 40.424 19.238 37.016 6" opacity=".24"/><path d="M64.4871795 11C62.8461538 11 61.5128205 11.2825688 60.5384615 11.8990826 59.4102564 12.5669725 58.6923077 13.6458716 58.4102564 15.0844037L61.1025641 15.3155963C61.2564103 14.5706422 61.6410256 14.0311927 62.2564103 13.6715596 62.7692308 13.3633028 63.4615385 13.2091743 64.3076923 13.2091743 66.3076923 13.2091743 67.3076923 14.133945 67.3076923 15.9834862L67.3076923 16.5229358 64.3333333 16.6C62.3846154 16.6513761 60.8461538 17.0366972 59.7692308 17.8073394 58.5897436 18.6036697 58 19.759633 58 21.2495413 58 22.3541284 58.4102564 23.253211 59.2564103 23.946789 60.025641 24.640367 61.1025641 25 62.4871795 25 63.6666667 25 64.6923077 24.7688073 65.5641026 24.3577982 66.3333333 23.9724771 66.974359 23.4330275 67.4871795 22.7651376L67.4871795 24.640367 70 24.640367 70 16.1633028C70 14.5449541 69.5897436 13.3119266 68.7948718 12.4642202 67.8717949 11.4880734 66.4358974 11 64.4871795 11ZM67.3076923 18.5009174 67.3076923 19.2715596C67.3076923 20.2990826 66.8717949 21.1724771 66.0512821 21.866055 65.2307692 22.559633 64.2564103 22.9192661 63.1025641 22.9192661 62.4102564 22.9192661 61.8461538 22.7394495 61.4358974 22.4055046 61 22.0715596 60.7948718 21.6605505 60.7948718 21.146789 60.7948718 19.5027523 62.025641 18.6293578 64.5128205 18.5779817L67.3076923 18.5009174ZM78.05 8 75.4 9.09356725 75.4 12.1505848 73 12.1505848 73 14.3377193 75.4 14.3377193 75.4 21.7938596C75.4 22.8128655 75.625 23.5833333 76.125 24.130117 76.625 24.7017544 77.45 25 78.55 25L80.675 25 80.675 22.8128655 78.975 22.8128655C78.65 22.8128655 78.425 22.7134503 78.275 22.5643275 78.125 22.3903509 78.05 22.1418129 78.05 21.7938596L78.05 14.3377193 81 14.3377193 81 12.1505848 78.05 12.1505848 78.05 8ZM88.9166667 11C86.8055556 11 85.1111111 11.6678899 83.8888889 13.0293578 82.6111111 14.3651376 82 16.0091743 82 17.987156 82 20.1706422 82.6666667 21.8917431 84 23.1761468 85.2222222 24.3834862 86.9166667 25 89.0277778 25 90.9444444 25 92.5277778 24.4862385 93.7777778 23.4844037 94.7777778 22.6623853 95.4166667 21.6091743 95.75 20.3761468L92.8055556 20.3761468C92.4166667 21.146789 92 21.7376147 91.5 22.0972477 90.8611111 22.533945 90.0277778 22.7651376 89 22.7651376 87.8333333 22.7651376 86.9166667 22.4055046 86.25 21.7376147 85.5833333 21.0440367 85.2222222 20.0422018 85.1111111 18.7577982L96 18.7577982C95.9722222 16.3944954 95.3888889 14.5449541 94.2777778 13.2091743 93.0555556 11.7192661 91.25 11 88.9166667 11ZM89 13.2348624C91.3333333 13.2348624 92.6388889 14.3908257 92.9166667 16.7027523L85.1666667 16.7027523C85.3333333 15.5724771 85.75 14.7247706 86.3611111 14.133945 87.0277778 13.5174312 87.8888889 13.2348624 89 13.2348624ZM102.254072 9C101.420195 9 100.690554 9.23728814 100.065147 9.7645951 99.5439739 10.13371 99.1009772 10.6873823 98.762215 11.4256121L98.762215 9.36911488 96 9.36911488 96 23 98.762215 23 98.762215 15.7758945C98.762215 14.5894539 99.1009772 13.613936 99.8045603 12.8757062 100.456026 12.1902072 101.211726 11.8474576 102.045603 11.8474576 102.67101 11.8474576 103.322476 11.9265537 104 12.1374765L104 9.34274953C103.530945 9.10546139 102.931596 9 102.254072 9ZM111.224571 9C109.919419 9 108.714663 9.60640301 107.660502 10.8719397L107.660502 9.36911488 105 9.36911488 105 23 107.660502 23 107.660502 14.8003766C107.660502 13.8512241 107.911493 13.0338983 108.463672 12.3747646 108.965654 11.6892655 109.668428 11.346516 110.521797 11.346516 112.278732 11.346516 113.182299 12.4011299 113.182299 14.5630885L113.182299 23 115.842801 23 115.842801 14.6158192C115.842801 13.613936 116.093791 12.7966102 116.595773 12.2165725 117.097754 11.6365348 117.700132 11.346516 118.453104 11.346516 119.457067 11.346516 120.21004 11.5838041 120.661823 12.1111111 121.113606 12.6120527 121.339498 13.4293785 121.339498 14.5367232L121.339498 23 124 23 124 14.0621469C124 12.5329567 123.548217 11.3201507 122.694848 10.3973635 121.81638 9.44821092 120.712021 9 119.38177 9 118.503303 9 117.775429 9.15819209 117.173052 9.50094162 116.520476 9.84369115 115.892999 10.4500942 115.31572 11.2937853 114.51255 9.7645951 113.1321 9 111.224571 9ZM133.487179 11C131.846154 11 130.512821 11.2825688 129.538462 11.8990826 128.410256 12.5669725 127.692308 13.6458716 127.410256 15.0844037L130.102564 15.3155963C130.25641 14.5706422 130.641026 14.0311927 131.25641 13.6715596 131.769231 13.3633028 132.461538 13.2091743 133.307692 13.2091743 135.307692 13.2091743 136.307692 14.133945 136.307692 15.9834862L136.307692 16.5229358 133.333333 16.6C131.384615 16.6513761 129.846154 17.0366972 128.769231 17.8073394 127.589744 18.6036697 127 19.759633 127 21.2495413 127 22.3541284 127.410256 23.253211 128.25641 23.946789 129.025641 24.640367 130.102564 25 131.487179 25 132.666667 25 133.692308 24.7688073 134.564103 24.3577982 135.333333 23.9724771 135.974359 23.4330275 136.487179 22.7651376L136.487179 24.640367 139 24.640367 139 16.1633028C139 14.5449541 138.589744 13.3119266 137.794872 12.4642202 136.871795 11.4880734 135.435897 11 133.487179 11ZM136.307692 18.5009174 136.307692 19.2715596C136.307692 20.2990826 135.871795 21.1724771 135.051282 21.866055 134.230769 22.559633 133.25641 22.9192661 132.102564 22.9192661 131.410256 22.9192661 130.846154 22.7394495 130.435897 22.4055046 130 22.0715596 129.794872 21.6605505 129.794872 21.146789 129.794872 19.5027523 131.025641 18.6293578 133.512821 18.5779817L136.307692 18.5009174ZM148.254072 9C147.420195 9 146.690554 9.23728814 146.065147 9.7645951 145.543974 10.13371 145.100977 10.6873823 144.762215 11.4256121L144.762215 9.36911488 142 9.36911488 142 23 144.762215 23 144.762215 15.7758945C144.762215 14.5894539 145.100977 13.613936 145.80456 12.8757062 146.456026 12.1902072 147.211726 11.8474576 148.045603 11.8474576 148.67101 11.8474576 149.322476 11.9265537 150 12.1374765L150 9.34274953C149.530945 9.10546139 148.931596 9 148.254072 9Z" opacity=".24"/><polygon points="150 6 150 25 153.047 25 153.047 20.276 154.743 18.841 160.09 25 164 25 156.842 17.066 163.425 11.507 159.487 11.507 153.047 17.066 153.047 6" opacity=".24"/></g></svg>
EOF
- name: Is a tag created auto?
id: create_tag
uses: jaywcjlove/create-tag-action@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
package-path: ./react/package.json
- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@main
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
commit_message: ${{steps.tag_version.outputs.tag}} ${{ github.event.head_commit.message }}
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build
- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@main
if: steps.create_tag.outputs.successful
with:
head-ref: ${{ steps.create_tag.outputs.version }}
filter-author: (小弟调调™|Renovate Bot|renovate-bot)
filter: '[R|r]elease[d]\s+[v|V]\d(\.\d+){0,2}'
- name: Create Release
uses: ncipollo/release-action@v1
if: steps.create_tag.outputs.successful
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: ${{ steps.changelog.outputs.tag }}
tag: ${{ steps.changelog.outputs.tag }}
body: |
Documentation ${{ steps.changelog.outputs.tag }}: https://raw.githack.com/uiwjs/react-watermark/${{ steps.changelog.outputs.gh-pages-short-hash }}/index.html
Comparing Changes: ${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
# - run: git status
# - run: npm install @jsdevtools/npm-publish -g
# - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./react/package.json
- run: npm publish --access public
name: 📦 @uiw/react-watermark to NPM
working-directory: react
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish --access public
name: 📦 @uiw/watermark.js to NPM
working-directory: core
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}