@@ -2,16 +2,6 @@ name: Release Array
22
33on :
44 push :
5- branches :
6- - main
7- paths :
8- - " apps/array/**"
9- - " packages/agent/**"
10- - " packages/electron-trpc/**"
11- - " pnpm-lock.yaml"
12- - " package.json"
13- - " turbo.json"
14- - " .github/workflows/array-release.yml"
155 tags :
166 - " v*"
177
@@ -57,48 +47,17 @@ jobs:
5747 node-version : 22
5848 cache : " pnpm"
5949
60- - name : Compute version from git tags
50+ - name : Extract version from tag
6151 id : version
6252 run : |
63- # Find the latest minor version tag (vX.Y format - exactly 2 parts)
64- # These are manually created to mark new minor releases
65- # Release tags (vX.Y.Z) are ignored for base version calculation
66- LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*' --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+$' | head -1)
67-
68- # Fall back to vX.Y.0 format if no vX.Y tags exist (backward compat)
69- if [ -z "$LATEST_TAG" ]; then
70- LATEST_TAG=$(git tag --list 'v[0-9]*.[0-9]*.0' --sort=-v:refname | head -1)
71- fi
72-
73- if [ -z "$LATEST_TAG" ]; then
74- echo "No version tag found. Create one with: git tag v0.15 && git push origin v0.15"
75- exit 1
76- fi
77-
78- # Extract major.minor from tag
79- VERSION_PART=${LATEST_TAG#v}
80- MAJOR=$(echo "$VERSION_PART" | cut -d. -f1)
81- MINOR=$(echo "$VERSION_PART" | cut -d. -f2)
82-
83- # Count commits since the base tag
84- PATCH=$(git rev-list "$LATEST_TAG"..HEAD --count)
85-
86- if [ "$PATCH" -eq 0 ]; then
87- echo "No commits since $LATEST_TAG. Nothing to release."
88- exit 1
89- fi
90-
91- NEW_VERSION="${MAJOR}.${MINOR}.${PATCH}"
92- echo "Version: $NEW_VERSION (from base tag $LATEST_TAG + $PATCH commits)"
93-
94- echo "version=$NEW_VERSION" >> "$GITHUB_OUTPUT"
95- echo "base_tag=$LATEST_TAG" >> "$GITHUB_OUTPUT"
53+ TAG_VERSION="${GITHUB_REF#refs/tags/v}"
54+ echo "Version: $TAG_VERSION"
55+ echo "version=$TAG_VERSION" >> "$GITHUB_OUTPUT"
9656
9757 - name : Set version in package.json
9858 env :
9959 APP_VERSION : ${{ steps.version.outputs.version }}
10060 run : |
101- # Update package.json for the build (not committed)
10261 jq --arg v "$APP_VERSION" '.version = $v' apps/array/package.json > tmp.json && mv tmp.json apps/array/package.json
10362 echo "Set apps/array/package.json version to $APP_VERSION"
10463
@@ -132,16 +91,6 @@ jobs:
13291 security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k "$KEYCHAIN_PASSWORD" "$KEYCHAIN"
13392 rm "$RUNNER_TEMP/certificate.p12"
13493
135- - name : Create tag
136- env :
137- APP_VERSION : ${{ steps.version.outputs.version }}
138- GH_TOKEN : ${{ steps.app-token.outputs.token }}
139- REPOSITORY : ${{ github.repository }}
140- run : |
141- TAG="v$APP_VERSION"
142- git tag -a "$TAG" -m "Release $TAG"
143- git push "https://x-access-token:${GH_TOKEN}@github.com/$REPOSITORY" "$TAG"
144-
14594 - name : Build native modules
14695 run : pnpm --filter array run build-native
14796
0 commit comments