Skip to content

Bump react-dom and @types/react-dom #54

Bump react-dom and @types/react-dom

Bump react-dom and @types/react-dom #54

Workflow file for this run

name: Prepare Release
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
env:
NODE_VERSION: "18.x"
permissions: write-all
jobs:
prepare-artifacts:
name: Prepare Artifacts
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_APP_URL: ${{ vars.NEXT_PUBLIC_APP_URL }}
PRE_RELEASE_TAG: ${{ vars.PRE_RELEASE_TAG }}
AUTOMATION_USER_NAME: ${{ vars.AUTOMATION_USER_NAME }}
AUTOMATION_USER_EMAIL: ${{ vars.AUTOMATION_USER_EMAIL }}
SKIP_IGNITION_BUILD: true
outputs:
tag-name: ${{ steps.prepare-release.outputs.TAG_NAME }}
dependency-hash: ${{ steps.extract-dependencies.outputs.DEPENDENCY_HASH }}
rocketicons-tgz: ${{ steps.generated-pkg-name.outputs.PKG_FILE }}
rocketicons-artifact-id: ${{ contains(steps.prepare-release.outputs.TAG_NAME, 'release') == true && 'deployable-artifacts' || 'rocketicons-pkg' }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.head_ref }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Extract Dependencies
id: extract-dependencies
run: echo "DEPENDENCY_HASH=$(npx --yes @rocketclimb/sh extract-dependencies)" >> $GITHUB_OUTPUT
- name: Cache node_modules
uses: actions/cache@v4
id: npm-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ steps.extract-dependencies.outputs.DEPENDENCY_HASH }}
restore-keys: |
${{ runner.os }}-node-
- name: Cache icons
uses: actions/cache@v4
id: icons-cache
with:
path: |
packages/generator/icons
key: ${{ runner.os }}-icons-${{ hashFiles('packages/generator/src/definitions.ts') }}
restore-keys: |
${{ runner.os }}-icons-
- name: Install packages
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm install --ignore-scripts
- name: Icons Fetch
if: steps.icons-cache.outputs.cache-hit != 'true'
run: npm run fetch --workspace=packages/generator
- name: Build All
run: npm run build-all
- name: Run tests
run: npm run test-all
- name: Build Ignition statics
run: npm run generate-statics:all-icons --workspace=packages/ignition
- name: Setup git user
run: |
git config user.name ${{ env.AUTOMATION_USER_NAME }}
git config user.email ${{ env.AUTOMATION_USER_EMAIL }}
- name: Prepare tag or release
id: prepare-release
run: |
echo "TAG_NAME=$(npm run release | grep v)" >> $GITHUB_OUTPUT
- name: Set output as environment variable
run: echo "TAG_NAME=${{ steps.prepare-release.outputs.TAG_NAME }}" >> $GITHUB_ENV
- name: Get genereated package name
id: generated-pkg-name
run: echo "PKG_FILE=$(ls -1 -t *.tgz | head -1)" >> $GITHUB_OUTPUT
- name: Generate artifact for tag ${{ steps.prepare-release.outputs.TAG_NAME }}
run: |
echo "${{ steps.prepare-release.outputs.TAG_NAME }}" >> .tagrc
- name: Upload tag artifact to release job
uses: actions/upload-artifact@v4
with:
name: tag-artifact
path: .tagrc
- name: Upload deployable artifacts to release job
if: contains(steps.prepare-release.outputs.TAG_NAME, 'release')
uses: actions/upload-artifact@v4
with:
name: deployable-artifacts
path: |
release-notes.md
${{ steps.generated-pkg-name.outputs.PKG_FILE }}
- name: Upload rocketicons tgz as artifact
if: contains(steps.prepare-release.outputs.TAG_NAME, 'release') == false
uses: actions/upload-artifact@v4
with:
name: rocketicons-pkg
path: ${{ steps.generated-pkg-name.outputs.PKG_FILE }}
- name: Upload data-helpers
uses: actions/upload-artifact@v4
with:
name: data-helpers
path: packages/ignition/src/app/data-helpers
publish-ignition:
needs: prepare-artifacts
uses: ./.github/workflows/publish-ignition.yml
with:
dependencies-hash: ${{ needs.prepare-artifacts.outputs.dependency-hash }}
rocketicons-tgz: ${{ needs.prepare-artifacts.outputs.rocketicons-tgz }}
rocketicons-artifact-id: ${{ needs.prepare-artifacts.outputs.rocketicons-artifact-id }}
secrets:
token: ${{ secrets.VERCEL_TOKEN }}