diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d150cdb2..5cf03374 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,10 +11,30 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 with: node-version: '12.x' - run: npm ci - run: npm run lint - run: npm test + + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '12.x' + - name: Validate build + shell: bash + run: | + set -e + npm ci + git add -A + npm run package + if [ -n "$(git status --porcelain -- dist)" ]; then + echo "::error::Build result differs. Run 'npm run package' then commit and push any changes" + git status --porcelain -- dist + exit 1 + fi diff --git a/dist/index.js b/dist/index.js index 123c0fad..90c02454 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8443,7 +8443,7 @@ const TRANSFORMERS = { .trim() .replace(/\s+/g, "-") .toLowerCase() - .replace(/[^a-z0-9_]/g, "") + .replace(/[^a-z0-9-_]/g, "") .replace(/-+$/g, ""); return `#${number}-${name}`; },