Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Updated GitHub Workflow for RC Versioning #134

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions .github/workflows/cd-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- name: add pnpm typescript
run: pnpm add typescript@latest -w

- name: Build project
run: pnpm build

- name: Generate RC version
id: rc_version
run: |
Expand All @@ -60,18 +63,28 @@ jobs:
- name: Update package versions
run: |
RC_VERSION="${{ steps.rc_version.outputs.RC_VERSION }}"
for package in packages/*; do

# First update SDK version
cd packages/javascript-sdk
pnpm version $RC_VERSION --no-git-tag-version
SDK_VERSION=$RC_VERSION
cd ../..

for package in packages/nextjs packages/react; do
if [ -d "$package" ]; then
echo "Setting version for $package to $RC_VERSION"
cd $package

# Update package version
pnpm version $RC_VERSION --no-git-tag-version
cd - > /dev/null

# Update workspace dependency to specific version
sed -i 's|"workspace:\*"|"'"$SDK_VERSION"'"|' package.json

cd ../..
fi
done

- name: Build project
run: pnpm build

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
Expand Down
Loading