Skip to content
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
24 changes: 19 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
REGEX_PATTERN: "^v[0-9]+\\.[0-9]+\\.[0-9]+$"
RELEASE_TAG: ${{ github.event.release.tag_name }}

jobs:
highflame-validate:
Expand All @@ -25,10 +24,10 @@ jobs:
id: validate_tag
shell: bash
run: |-
if [[ "${{ env.RELEASE_TAG }}" =~ ${{ env.REGEX_PATTERN }} ]] ; then
echo "Valid version format: ${{ env.RELEASE_TAG }}"
if [[ "${{ env.GITHUB_REF_NAME }}" =~ ${{ env.REGEX_PATTERN }} ]] ; then
echo "Valid version format: ${{ env.GITHUB_REF_NAME }}"
else
echo "Invalid version format: ${{ env.RELEASE_TAG }}"
echo "Invalid version format: ${{ env.GITHUB_REF_NAME }}"
exit 1
fi

Expand Down Expand Up @@ -102,11 +101,26 @@ jobs:
- name: Install dependencies
run: bun install --frozen-lockfile

- name: Update the dependencies version
shell: bash
run: |-
VERSION="${GITHUB_REF_NAME#v}"

jq --arg version "^${VERSION}" '
.dependencies["@highflame/codeoid-core"] = $version |
.dependencies["@highflame/codeoid-protocol"] = $version' \
package.json > package.json.tmp && mv package.json.tmp package.json

cd packages/core
jq --arg version "^${VERSION}" \
'.peerDependencies["@highflame/codeoid-protocol"] = $version' \
package.json > package.json.tmp && mv package.json.tmp package.json

# Every publishable package ships at the SAME version, and the tag is that
# version. One gate replaces per-package version bookkeeping: if this
# passes, all three publishes below are known-correct and known-new.
- name: Verify workspace versions are in lockstep with the tag
run: bun run check:versions "${GITHUB_REF_NAME}"
run: bun run check:versions "${{ env.GITHUB_REF_NAME }}"

- name: Build web UI
run: |-
Expand Down
Loading