diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index cf3746a..0c159af 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -14,11 +14,11 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: 19 + node-version: 20 registry-url: https://registry.npmjs.org/ - run: npm install - - run: | - TAG=$(echo $GITHUB_REF_NAME | grep -oP '^v\d+\.\d+\.\d+-?\K(\w+)?') - npm publish --provenance --access=public --tag ${TAG:-latest} + - if: ${{ github.event.release.tag_name != '' && env.NPM_PUBLISH_TAG != '' }} + run: npm publish --provenance --access=public --tag=${{ env.NPM_PUBLISH_TAG }} env: NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NPM_PUBLISH_TAG: ${{ contains(github.event.release.tag_name, '-beta.') && 'beta' || contains(github.event.release.tag_name, '-alpha.') && 'canary' || 'latest' }} diff --git a/.npmignore b/.npmignore index e7d0423..9c8d84d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,4 +1,6 @@ .github +.gitattributes .vscode .editorconfig .eslintrc.json +.prettierrc diff --git a/package.json b/package.json index 54bd5bc..3eddc16 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@chrisburnell/eleventy-cache-webmentions", - "version": "2.1.1", + "version": "2.1.2", "description": "Cache webmentions using eleventy-fetch and make them available to use in collections, layouts, pages, etc. in Eleventy.", "license": "MIT", "repository": { @@ -11,17 +11,31 @@ "bugs": { "url": "https://github.com/chrisburnell/eleventy-cache-webmentions/issues" }, - "author": "Chris Burnell ", + "author": { + "name": "Chris Burnell", + "email": "me@chrisburnell.com", + "url": "https://chrisburnell.com/" + }, "contributors": [ { "name": "Chris Burnell", "email": "me@chrisburnell.com", - "url": "https://chrisburnell.com", - "mastodon": "@chrisburnell@repc.co" + "url": "https://chrisburnell.com" + } + ], + "funding": [ + { + "type": "buymeacoffee", + "url": "https://buymeacoffee.com/chrisburnell" + }, + { + "type": "github", + "url": "https://github.com/sponsors/chrisburnell" } ], "publishConfig": { - "access": "public" + "access": "public", + "provenance": true }, "main": "eleventy-cache-webmentions.js", "scripts": {