Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
release:
types: [created, edited, published]
workflow_dispatch:
inputs:
dryRun:
description: Dry run only
required: true
default: true
type: boolean

jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: 22
registry-url: https://registry.npmjs.org
- run: npm ci

- name: Publish package
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
if: >
(github.event_name == 'release' && github.event.action == 'published') ||
(github.event_name == 'workflow_dispatch' && !inputs.dryRun)
run: npm publish --provenance --access public

- name: Publish package (dry run)
env:
NODE_AUTH_TOKEN: ${{ secrets.REGISTRY_PUBLISH_TOKEN }}
if: >
(github.event_name == 'release' && github.event.action != 'published') ||
(github.event_name == 'workflow_dispatch' && inputs.dryRun)
run: npm publish --dry-run
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
],
"repository": {
"type": "git",
"url": "https://github.com/squizlabs/HTML_CodeSniffer.git"
"url": "https://github.com/pa11y/HTML_CodeSniffer.git"
},
"author": "Squiz",
"bugs": {
"url": "https://github.com/squizlabs/HTML_CodeSniffer/issues"
"url": "https://github.com/pa11y/HTML_CodeSniffer/issues"
},
"homepage": "http://squizlabs.github.io/HTML_CodeSniffer/",
"devDependencies": {
Expand Down