Skip to content

chore: update @auth0/auth0-acul-js dependency to version 1.2.0 #296

chore: update @auth0/auth0-acul-js dependency to version 1.2.0

chore: update @auth0/auth0-acul-js dependency to version 1.2.0 #296

Workflow file for this run

name: Monorepo Release
on:
pull_request:
types:
- closed
branches:
- 'master'
workflow_dispatch:
permissions:
contents: write
id-token: write
jobs:
release:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.merged && startsWith(github.event.pull_request.head.ref, 'release/'))
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
- name: Check Node.js version
run: node --version
- name: Install deps
run: npm ci --workspaces --include-workspace-root
# Parse package name and version from branch
- name: Parse version and package
id: meta
run: |
REF="${{ github.head_ref || github.ref_name }}"
echo "REF=$REF"
# Extract DIR_NAME from branch name - handle v prefix in version
DIR_NAME=$(echo "$REF" | sed -E 's|^release/([a-zA-Z0-9-]+)-v?[0-9]+\.[0-9]+\.[0-9]+.*$|\1|')
PACKAGE_JSON_PATH="packages/$DIR_NAME/package.json"
PACKAGE_NAME=$(jq -r .name "$PACKAGE_JSON_PATH")
PACKAGE_NAME_UNSCOPED=$(echo "$PACKAGE_NAME" | sed 's/^@[^/]*\///')
PACKAGE_VERSION=$(jq -r .version "$PACKAGE_JSON_PATH")
if [ -z "$PACKAGE_NAME" ] || [ -z "$PACKAGE_VERSION" ]; then
echo "ERROR: Could not parse package name or version."
exit 1
fi
# Determine if this is a prerelease
IS_PRERELEASE=false
if [[ "$PACKAGE_VERSION" =~ (alpha|beta|rc) ]]; then
IS_PRERELEASE=true
fi
echo "name=$PACKAGE_NAME" >> $GITHUB_OUTPUT
echo "name_unscoped=$PACKAGE_NAME_UNSCOPED" >> $GITHUB_OUTPUT
echo "dir=$DIR_NAME" >> $GITHUB_OUTPUT
echo "version=$PACKAGE_VERSION" >> $GITHUB_OUTPUT
echo "tag_name=$PACKAGE_NAME_UNSCOPED-v$PACKAGE_VERSION" >> $GITHUB_OUTPUT
echo "is_prerelease=$IS_PRERELEASE" >> $GITHUB_OUTPUT
- name: Install rimraf globally
run: npm install -g rimraf
- name: Get release notes from PR
id: release_notes
uses: ./.github/actions/get-release-notes
with:
version: ${{ steps.meta.outputs.dir }}-v${{ steps.meta.outputs.version }}
repo_name: ${{ github.event.repository.name }}
repo_owner: ${{ github.event.repository.owner.login }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to NPM
uses: ./.github/actions/npm-publish
with:
node-version: 22
npm-token: ${{ secrets.NPM_TOKEN }}
version: ${{ steps.meta.outputs.version }}
require-build: true
package: ${{ steps.meta.outputs.dir }}
release-directory: ${{ steps.meta.outputs.dir }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Create GitHub Release
uses: ./.github/actions/release-create
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.meta.outputs.tag_name }}
name: ${{ steps.meta.outputs.tag_name }}
version: ${{ steps.meta.outputs.version }}
commit: ${{ github.sha }}
body: ${{ steps.release_notes.outputs.release-notes }}
prerelease: ${{ steps.meta.outputs.is_prerelease }}
- name: Checkout current gh-pages branch to preserve existing docs
uses: actions/checkout@v4
with:
ref: gh-pages
path: existing-docs
fetch-depth: 1
- name: Restore existing docs before generation
run: |
if [ -d "existing-docs" ]; then
mkdir -p ./docs
cp -r existing-docs/* ./docs/ 2>/dev/null || true
echo "Restored existing documentation"
ls -la ./docs/ || true
else
echo "No existing docs found, creating fresh"
mkdir -p ./docs
fi
- name: Generate documentation for released package only
run: npm run docs:unified ${{ steps.meta.outputs.dir }}
- name: Deploy updated documentation
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
keep_files: false