Skip to content

primitives@1.1.2

primitives@1.1.2 #156

Workflow file for this run

name: Publish
# Rules that triggers the workflows
on:
release:
types:
- created
workflow_dispatch:
permissions:
contents: read
packages: write
id-token: write # needed for provenance data generation
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Build
run: pnpm primitives:build
- name: Build Schematics
run: pnpm primitives:build:schematics
- name: Publish package 📦
run: |
VERSION="$(node -p "require('./packages/primitives/package.json').version")"
if [[ "$VERSION" == *-* ]]; then
# Prerelease (e.g. 1.0.0-beta.0) -> publish under its identifier dist-tag (beta/rc/alpha),
# never "latest", so `npm i @radix-ng/primitives` keeps resolving the stable release.
TAG="$(printf '%s' "$VERSION" | sed -E 's/^[0-9.]+-([0-9A-Za-z]+).*/\1/')"
else
TAG="latest"
fi
echo "Publishing $VERSION under dist-tag: $TAG"
npx nx release publish --tag "$TAG"
shell: bash
env:
NPM_CONFIG_PROVENANCE: true