Skip to content

chore(deps): update react-aria - abandoned #1902

chore(deps): update react-aria - abandoned

chore(deps): update react-aria - abandoned #1902

Workflow file for this run

name: Release
on:
push:
branches:
- main
issue_comment:
types: [created]
workflow_dispatch:
permissions:
id-token: write
contents: read
pull-requests: write
jobs:
release:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
# Get GitHub token via the CT Changesets App
- name: Generate GitHub token (via CT Changesets App)
id: generate_github_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
# Pass a personal access token (using our `ct-changesets` app) to be able to trigger other workflows
# https://help.github.com/en/actions/reference/events-that-trigger-workflows#triggering-new-workflows-using-a-personal-access-token
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
token: ${{ steps.generate_github_token.outputs.token }}
# Ensure we are using valid node version for npm trusted publising AFTER checkout
# https://docs.npmjs.com/trusted-publishers#github-actions-configuration
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
# Ensure npm >=11.5.1 for OIDC support (npm@12 has a broken sigstore dependency)
- name: Update npm
run: npm install -g npm@11
- name: Verify npm version
run: npm --version
- name: Installing dependencies and building packages
uses: ./.github/actions/ci
# Configure npm registry for trusted publishing (OIDC)
# This must run AFTER the CI action to override the Node setup with registry config
# https://docs.npmjs.com/trusted-publishers#github-actions-configuration
- name: Setup npm registry for publishing
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Storing release version for changeset
id: release_version
run: echo "VALUE=$(./scripts/print_release_version.sh)" >> $GITHUB_OUTPUT
shell: bash
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
- name: Creating release pull request or publishing release to npm registry
id: changesets
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
with:
publish: pnpm changeset publish
version: pnpm changeset:version-and-format
commit: "ci(changesets): version packages"
title: "ci(changesets): version packages"
createGithubReleases: true
commitMode: "github-api"
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
SKIP_POSTINSTALL_DEV_SETUP: true
# Publish canary releases only if the packages weren't published already
- name: Regenerate GitHub token for canary
if: steps.changesets.outputs.published != 'true' && github.ref ==
'refs/heads/main'
id: generate_github_token_canary
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}
- name: Publishing canary releases to npm registry
if: steps.changesets.outputs.published != 'true' && github.ref ==
'refs/heads/main'
run: |
set -euo pipefail
git fetch origin main
git reset --hard origin/main
git clean -fd
pnpm changeset version --snapshot canary
pnpm changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ steps.generate_github_token_canary.outputs.token }}
canary-from-pr:
if: >
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
contains(github.event.comment.body, '[/deploy-canary]')
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Get PR branch
id: pr
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const pr = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number,
});
const branch = pr.data.head.ref;
const sanitized = branch.replace(/[^a-zA-Z0-9-]/g, '-').slice(0, 40);
core.setOutput('ref', branch);
core.setOutput('sha', pr.data.head.sha);
core.setOutput('tag', sanitized);
- name: React to comment
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
await github.rest.reactions.createForIssueComment({
owner: context.repo.owner,
repo: context.repo.repo,
comment_id: context.payload.comment.id,
content: 'rocket',
});
- name: Checkout PR branch
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
ref: ${{ steps.pr.outputs.ref }}
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Update npm
run: npm install -g npm@11
- name: Install and build
uses: ./.github/actions/ci
- name: Setup npm registry for publishing
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7
with:
node-version: "24"
registry-url: "https://registry.npmjs.org"
- name: Generate GitHub token
id: generate_github_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a # v2.1.0
with:
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}
- name: Publish canary snapshot
id: publish
run: |
set -euo pipefail
SNAPSHOT_TAG="canary-${{ steps.pr.outputs.tag }}"
pnpm changeset version --snapshot "$SNAPSHOT_TAG"
pnpm changeset publish --tag canary 2>&1 | tee /tmp/publish-output.txt
VERSION=$(grep -oP '@commercetools/nimbus@\K[^\s]+' /tmp/publish-output.txt | head -1)
echo "version=$VERSION" >> $GITHUB_OUTPUT
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
- name: Comment with install instructions
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
script: |
const version = '${{ steps.publish.outputs.version }}';
const sha = '${{ steps.pr.outputs.sha }}'.slice(0, 7);
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: [
`### 🚀 Canary published`,
'',
`**Version:** \`${version}\``,
`**Commit:** \`${sha}\``,
'',
'```bash',
`pnpm add @commercetools/nimbus@${version}`,
`pnpm add @commercetools/nimbus-tokens@${version}`,
`pnpm add @commercetools/nimbus-icons@${version}`,
`pnpm add @commercetools/nimbus-theme-generator@${version}`,
'```',
].join('\n'),
});