Skip to content

Always redirect to endpoint #598

Always redirect to endpoint

Always redirect to endpoint #598

Workflow file for this run

name: Build
on:
workflow_call:
pull_request:
jobs:
build:
name: Build & Test
runs-on:
group: ubuntu-large-runners
permissions:
actions: read
contents: read
id-token: write
env:
COREPACK_ENABLE_STRICT: 0
ZUDOKU_INTERNAL_DEV: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".tool-versions"
registry-url: "https://registry.npmjs.org"
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- run: pnpm install nx --global
- uses: nrwl/nx-set-shas@v4
- run: nx run-many -t root:lint:ci root:format:ci build:ci
- name: Get Variables
id: vars
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Version (Canary)
if: github.event_name == 'push'
run: nx release version --specifier 0.0.0-${{ steps.vars.outputs.sha_short }} --git-tag=false
- name: Publish Modules
run: pnpm publish --provenance --filter zudoku --filter create-zudoku-app --filter config --tag canary --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
- name: Build Examples
run: nx run-many -t build --projects=tag:example
# Check if the stats file exists, if zudoku doesn't change in the PR
# the stats file won't exist and we don't need to upload it
- name: Has Stats
run: echo "exists=${{ hashFiles('./packages/zudoku/stats.html') != '' }}" >> $GITHUB_OUTPUT
id: stats-file