Skip to content

New codemod to help migrating React components "defaultProps" usage (… #1734

New codemod to help migrating React components "defaultProps" usage (…

New codemod to help migrating React components "defaultProps" usage (… #1734

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
id-token: write
jobs:
release:
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/[email protected]
with:
app_id: ${{ secrets.CT_CHANGESETS_APP_ID }}
private_key: ${{ secrets.CT_CHANGESETS_APP_PEM }}
- name: Checkout
uses: actions/checkout@v4
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 }}
- name: Installing dependencies and building packages
uses: ./.github/actions/ci
- name: Creating .npmrc
run: |
cat << EOF > "$HOME/.npmrc"
provenance=true
[email protected]
//registry.npmjs.org/:_authToken=$NPM_TOKEN
EOF
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- 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/[email protected]
uses: dotansimha/[email protected]
with:
publish: pnpm changeset publish
version: pnpm changeset:version-and-format
commit: 'ci(changesets): version packages'
createGithubReleases: aggregate
githubReleaseName: v${{ steps.release_version.outputs.VALUE }}
githubTagName: v${{ steps.release_version.outputs.VALUE }}
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: Publishing canary releases to npm registry
if: steps.changesets.outputs.published != 'true' && github.ref == 'refs/heads/main'
run: |
git checkout main
pnpm changeset version --snapshot canary
pnpm changeset publish --tag canary
env:
GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }}
- name: Building Playground application
if: steps.changesets.outputs.published != 'true' && github.ref == 'refs/heads/main'
run: pnpm playground:build
env:
APP_ID: ${{ secrets.APP_ID_PLAYGROUND }}
MC_API_URL: ${{ secrets.MC_API_URL }}
CTP_INITIAL_PROJECT_KEY: ${{ secrets.CYPRESS_PROJECT_KEY }}
HOST_GCP_STAGING: ${{ secrets.HOST_GCP_STAGING }}