Skip to content

test: add component tests #76

test: add component tests

test: add component tests #76

Workflow file for this run

name: Publish
on:
push:
branches:
- main
- alpha
- beta
jobs:
run-tests:
name: Tests
uses: ./.github/workflows/test.yaml
publish:
name: Build and Publish
needs:
- run-tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.KONGPONENTS_BOT_PAT }}
- name: setup git
run: |
git config user.email "[email protected]"
git config user.name "Kong UI Bot"
- name: Create .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }}
# Reference the env variable NPM_TOKEN here, not the secret
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
- name: Setup PNPM with Dependencies
uses: ./.github/actions/setup-pnpm-with-dependencies/
- name: Build
# Since we lint in the Tests job, we can just build here
run: pnpm run build
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
env:
# Since branch protections are on (pushing commits) you need to use a bot PAT
GITHUB_TOKEN: ${{ secrets.KONGPONENTS_BOT_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN_PUBLIC_PUBLISH }}