Skip to content

Refresh vendored icon registry and Central Icons package #42

Refresh vendored icon registry and Central Icons package

Refresh vendored icon registry and Central Icons package #42

Workflow file for this run

name: "Publish to npm"
on:
pull_request:
types: [closed]
branches: [main]
jobs:
publish:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/')
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 24
cache: "npm"
registry-url: https://registry.npmjs.org
- name: Install dependencies
run: npm ci --legacy-peer-deps
env:
CENTRAL_LICENSE_KEY: ${{ secrets.CENTRAL_LICENSE_KEY }}
- name: Run tests
run: npm run test:unit
- name: Run publish checks
run: npm run lint:publish
- name: Publish to npm
run: npm publish --provenance --access public
- name: Create git tag and GitHub release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(node -p "require('./package.json').version")
git tag "v${VERSION}"
git push origin "v${VERSION}"
# Extract this version's changelog entry (everything between this ## and the next ##)
NOTES=$(sed -n "/^## .*${VERSION}/,/^## /{ /^## .*${VERSION}/d; /^## /d; p; }" CHANGELOG.md)
gh release create "v${VERSION}" \
--title "v${VERSION}" \
--notes "${NOTES:-Release v${VERSION}}"