Skip to content

Publish to npm

Publish to npm #26

Workflow file for this run

name: Publish to npm
on:
workflow_dispatch:
jobs:
release-stable:
runs-on: ubuntu-latest
environment: upload
permissions:
id-token: write # Required by Akeyless
contents: read
packages: read
steps:
- name: Import Secrets
id: import-secrets
uses: LanceMcCarthy/akeyless-action@v3
with:
access-id: ${{ secrets.GH_AKEYLESS_ACCESS_ID }}
static-secrets: |
{
"/WebComponents/prod/tokens/GH_TOKEN": "GH_TOKEN",
"/WebComponents/prod/tokens/PROGRESS_NPM_REGISTRY_TOKEN": "NPM_TOKEN"
}
export-secrets-to-environment: false
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: master
fetch-depth: '0'
token: ${{ steps.import-secrets.outputs.GH_TOKEN }}
- name: Setup git
run: |
git config user.name "kendo-bot"
git config user.email "[email protected]"
- name: Merge develop to master
run: |
git fetch --quiet
git reset --hard origin/master
git merge --ff-only --quiet origin/develop
- name: Setup node
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
env:
NODE_AUTH_TOKEN: ${{ steps.import-secrets.outputs.NPM_TOKEN }}
- name: Install
run: npm ci --no-audit --no-fund
- name: Build themes for dist
run: |
npm run sass
npm run sass:swatches
npm run docs
- name: Lerna publish
run: |
npx lerna publish --conventional-commits --conventional-graduate --create-release github --force-publish --exact
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}
- name: Mark checks as successful
run: |
commit=$(git rev-parse HEAD)
./build/mark-checks.sh $commit
env:
GH_TOKEN: ${{ steps.import-secrets.outputs.GH_TOKEN }}
- name: Push to GitHub
run: |
git push origin master --tags --quiet > /dev/null 2>&1
git push origin master:develop --quiet > /dev/null 2>&1