chore(deps): lock file maintenance (#402) #1170
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
name: Navigate UI - CI | |
on: | |
push: | |
branches: ['main'] | |
tags: ['v*'] | |
pull_request: | |
branches: ['main'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: npm i -g corepack@latest && corepack enable | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'pnpm' | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm exec playwright install chromium --with-deps | |
- run: pnpm codegen --check | |
- run: pnpm build | |
- run: pnpm lint | |
- run: pnpm test | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-artifact | |
path: | | |
dist | |
!dist/**/*.md | |
sbt-update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'sbt' | |
- uses: sbt/setup-sbt@v1 | |
# Start sbt to check tlBaseVersion | |
- run: sbt +update | |
publish: | |
name: Publish Artifacts | |
needs: [build] | |
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v')) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- run: corepack enable | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 22.x | |
cache: 'pnpm' | |
registry-url: 'https://registry.npmjs.org' | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'sbt' | |
- uses: sbt/setup-sbt@v1 | |
- run: pnpm install --frozen-lockfile | |
- run: pnpm build | |
- name: Import signing key | |
env: | |
PGP_SECRET: ${{ secrets.PGP_SECRET }} | |
run: echo $PGP_SECRET | base64 -d -i - | gpg --import | |
# Run sbt publish first before making the local repo dirty with pnpm publish | |
- name: Publish artifacts | |
run: | | |
sbt '+publish; sonatypeBundleRelease' | |
pnpm version from-git --git-tag-version=false | |
pnpm publish --access public --no-git-checks --provenance | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_REPO_TOKEN }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} |