# Publishes @openkhalix/tansy-ui when a version tag (v0.4.0, v1.0.0 …) is pushed. # # Needs a repository secret NPM_TOKEN: an npm "Automation" (or granular # publish) token for an account that belongs to the openkhalix npm org. name: Release on: push: tags: ['v*'] jobs: publish: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: 24 cache: npm registry-url: https://registry.npmjs.org - run: npm ci - name: Tag must match the package version run: | version=$(node -p "require('./packages/ui/package.json').version") if [ "${GITHUB_REF_NAME}" != "v${version}" ]; then echo "Tag ${GITHUB_REF_NAME} does not match package version v${version}" >&2 exit 1 fi - run: npm run lint - run: npm test # prepublishOnly re-runs typecheck, tests and the library build. - run: npm publish -w @openkhalix/tansy-ui --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}