Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
44 changes: 30 additions & 14 deletions .github/workflows/beta_release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
name: Public Beta Release

# One workflow for both SDKs' beta releases. The tag namespace decides the product:
# x.y.z-beta.n -> legacy (skyvault)
# flowvault/x.y.z-beta.n -> flowvault
on:
push:
tags: "*.*.*-beta.*"
tags:
- '*.*.*-beta.*'
- 'flowvault/*-beta.*'

jobs:
build-sdk:
Expand All @@ -24,43 +29,54 @@ jobs:
run: |
raw=$(git branch -r --contains ${{ github.ref }})
branch=${raw##*/}
beta_branch="beta-release/$branch"
echo "::set-output name=branch::$beta_branch"
echo "Branch is $beta_branch."
echo "branch=beta-release/$branch" >> "$GITHUB_OUTPUT"
echo "Branch is beta-release/$branch."

- name: Create local properties file
run: |
touch local.properties
echo gpr.user=${{ github.actor }} >> local.properties
echo gpr.key=${{ secrets.PAT_ACTIONS }} >> local.properties

- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: 1.0.0
- name: Determine product from tag
id: prod
run: |
ref="${GITHUB_REF_NAME}"
if [[ "$ref" == flowvault/* ]]; then
product=flowvault; module=flowvault; version="${ref#flowvault/}"; gradle_file=flowvault/build.gradle; label="FlowVault Public Beta"
else
product=legacy; module=skyvault; version="$ref"; gradle_file=skyvault/build.gradle; label="Public Beta"
fi
{
echo "product=$product"
echo "module=$module"
echo "version=$version"
echo "gradle_file=$gradle_file"
echo "label=$label"
} >> "$GITHUB_OUTPUT"
echo "Beta releasing tag '$ref' as product=$product version=$version"

- name: Bump Version
run: |
chmod +x ./scripts/bump_version.sh
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"
./scripts/bump_version.sh ${{ steps.prod.outputs.product }} "${{ steps.prod.outputs.version }}"

- name: Commit changes
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.gihub.com
git branch -f ${{ steps.check_step.outputs.branch }} origin/${{ steps.check_step.outputs.branch }}
git checkout ${{ steps.check_step.outputs.branch }}
git add Skyflow/build.gradle
git commit -m "[AUTOMATED] Public Beta Release ${{ steps.previoustag.outputs.tag }}"
git checkout ${{ steps.check_step.outputs.branch }}
git add ${{ steps.prod.outputs.gradle_file }}
git commit -m "[AUTOMATED] ${{ steps.prod.outputs.label }} Release ${{ steps.prod.outputs.version }}"
git push origin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3
- name: Publish package
run: |
chmod +x gradlew
./gradlew publish -Pbeta=true
./gradlew :${{ steps.prod.outputs.module }}:publish -Pbeta=true
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
77 changes: 62 additions & 15 deletions .github/workflows/internal_release.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
name: Internal Release

# ONE internal (dev) release for both SDKs from a single `release/*` branch — no separate
# flowvault-release branch, no two PRs. What gets published is decided by the SCOPE of changes
# (relative to main), mirroring the skyflow-js internal workflow:
# common/ or a shared root changed -> publish BOTH skyvault + flowvault
# only skyvault/ changed -> publish skyvault
# only flowvault/ changed -> publish flowvault
# (Public/beta releases stay per-product via their tag namespaces — this scope logic is internal-only.)
on:
push:
tags-ignore:
- "*"
paths-ignore:
- "Skyflow/build.gradle"
- "skyvault/build.gradle"
- "flowvault/build.gradle"
- "*.md"
branches:
- release/*

jobs:
publish:
internal-release:
name: Internal Release
runs-on: ubuntu-latest

# Skip the automated version-bump commit this workflow pushes (belt-and-suspenders with paths-ignore).
if: "!contains(github.event.head_commit.message, '[AUTOMATED] Internal Release')"
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -26,13 +36,34 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Get Previous tag
id: previoustag
- name: Detect changed scope + base versions
id: scope
run: |
git fetch --no-tags origin main
git fetch --tags
tag=$(git describe --tags --abbrev=0 origin/main)
echo "::set-output name=tag::$tag"
echo "latest stable tag is $tag"
# Diff vs where this release branch diverged from main (idempotent across re-pushes).
BASE=$(git merge-base FETCH_HEAD HEAD)
CHANGED=$(git diff --name-only "$BASE" HEAD)
echo "Merge-base with main: $BASE"
echo "Changed files:"; echo "$CHANGED"

# Shared roots feed BOTH SDK builds -> treat like common.
SHARED='^(common/|scripts/|build\.gradle|settings\.gradle|gradle/|gradle\.properties|gradlew|\.github/workflows/)'
sky=false; fv=false
if echo "$CHANGED" | grep -qE "$SHARED"; then sky=true; fv=true; fi
if echo "$CHANGED" | grep -qE '^skyvault/'; then sky=true; fi
if echo "$CHANGED" | grep -qE '^flowvault/'; then fv=true; fi

# Base versions for the -dev suffix (skyvault: latest plain-semver tag on main; flowvault: latest flowvault/x.y.z).
skytag=$(git describe --tags --abbrev=0 --match '[0-9]*.[0-9]*.[0-9]*' origin/main 2>/dev/null || echo "1.27.0")
rawfv=$(git tag --list 'flowvault/[0-9]*.[0-9]*.[0-9]*' --sort=-v:refname | head -n1)
fvtag="${rawfv#flowvault/}"; [ -z "$fvtag" ] && fvtag="1.0.0"

{
echo "sky=$sky"; echo "fv=$fv"
echo "skytag=$skytag"; echo "fvtag=$fvtag"
} >> "$GITHUB_OUTPUT"
echo "Resolved -> skyvault=$sky (base $skytag) | flowvault=$fv (base $fvtag)"

- name: Cache Gradle and wrapper
uses: actions/cache@v4
Expand All @@ -42,25 +73,41 @@ jobs:
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}

- name: Bump Version
- name: Bump versions (in scope)
if: steps.scope.outputs.sky == 'true' || steps.scope.outputs.fv == 'true'
run: |
chmod +x ./scripts/bump_version.sh
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}" "$(git rev-parse --short "$GITHUB_SHA")"
sha="$(git rev-parse --short "$GITHUB_SHA")"
if [ "${{ steps.scope.outputs.sky }}" = "true" ]; then
./scripts/bump_version.sh legacy "${{ steps.scope.outputs.skytag }}" "$sha"
fi
if [ "${{ steps.scope.outputs.fv }}" = "true" ]; then
./scripts/bump_version.sh flowvault "${{ steps.scope.outputs.fvtag }}" "$sha"
fi

- name: Commit changes
- name: Commit version bump(s)
if: steps.scope.outputs.sky == 'true' || steps.scope.outputs.fv == 'true'
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.gihub.com
git add Skyflow/build.gradle
git commit -m "[AUTOMATED] Private Release ${{ steps.previoustag.outputs.tag }}-dev.$(git rev-parse --short $GITHUB_SHA)"
sha="$(git rev-parse --short "$GITHUB_SHA")"
[ "${{ steps.scope.outputs.sky }}" = "true" ] && git add skyvault/build.gradle
[ "${{ steps.scope.outputs.fv }}" = "true" ] && git add flowvault/build.gradle
git commit -m "[AUTOMATED] Internal Release (skyvault=${{ steps.scope.outputs.sky }}, flowvault=${{ steps.scope.outputs.fv }}) dev.$sha"
git push origin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3
- name: Publish package

- name: Publish (in scope)
if: steps.scope.outputs.sky == 'true' || steps.scope.outputs.fv == 'true'
run: |
chmod +x gradlew
./gradlew publish -Pdev=true
MODULES=""
[ "${{ steps.scope.outputs.sky }}" = "true" ] && MODULES="$MODULES :skyvault:publish"
[ "${{ steps.scope.outputs.fv }}" = "true" ] && MODULES="$MODULES :flowvault:publish"
echo "Publishing:$MODULES"
./gradlew $MODULES -Pdev=true
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 6 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
java-version: '17'
- name: Grant permissions to gradlew
run: chmod +x gradlew
- name: Run Android Linter
run: ./gradlew :Skyflow:lint
- name: Run Android Linter (both SDKs)
run: ./gradlew :skyvault:lint :flowvault:lint
build:

runs-on: ubuntu-latest
Expand All @@ -42,8 +42,8 @@ jobs:
java-version: '17'
- name: Grant permissions to gradlew
run: chmod +x gradlew
- name: Build SDK
run: ./gradlew :Skyflow:build
- name: Run Tests
- name: Build both SDKs
run: ./gradlew :skyvault:build :flowvault:build
- name: Run Tests (both SDKs via runOnGitHub aggregate)
id: tests
run: ./gradlew :Skyflow:test
run: ./gradlew runOnGitHub
49 changes: 33 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: Public Release

# One workflow for both SDKs. The tag namespace decides which one is released:
# x.y.z -> legacy (skyvault / skyflow-android-sdk)
# flowvault/x.y.z -> flowvault (skyflow-flowvault-android-sdk)
on:
push:
tags: '[0-9]+.[0-9]+.[0-9]+'

tags:
- '[0-9]+.[0-9]+.[0-9]+'
- 'flowvault/[0-9]+.[0-9]+.[0-9]+'

jobs:
build-sdk:
runs-on: ubuntu-latest
Expand All @@ -20,31 +25,43 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Get Previous tag
id: previoustag
uses: WyriHaximus/github-action-get-previous-tag@v1
with:
fallback: 1.0.0
- name: Determine product from tag
id: prod
run: |
ref="${GITHUB_REF_NAME}"
if [[ "$ref" == flowvault/* ]]; then
product=flowvault; module=flowvault; version="${ref#flowvault/}"; gradle_file=flowvault/build.gradle; label="FlowVault Public"
else
product=legacy; module=skyvault; version="$ref"; gradle_file=skyvault/build.gradle; label="Public"
fi
{
echo "product=$product"
echo "module=$module"
echo "version=$version"
echo "gradle_file=$gradle_file"
echo "label=$label"
} >> "$GITHUB_OUTPUT"
echo "Releasing tag '$ref' as product=$product version=$version"

- name: Bump Version
run: |
chmod +x ./scripts/bump_version.sh
./scripts/bump_version.sh "${{ steps.previoustag.outputs.tag }}"
chmod +x ./scripts/bump_version.sh
./scripts/bump_version.sh ${{ steps.prod.outputs.product }} "${{ steps.prod.outputs.version }}"

- name: Commit changes
run: |
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.gihub.com
git add Skyflow/build.gradle
git commit -m "[AUTOMATED] Public Release ${{ steps.previoustag.outputs.tag }}"
git push origin
git config user.name ${{ github.actor }}
git config user.email ${{ github.actor }}@users.noreply.gihub.com
git add ${{ steps.prod.outputs.gradle_file }}
git commit -m "[AUTOMATED] ${{ steps.prod.outputs.label }} Release ${{ steps.prod.outputs.version }}"
git push origin

- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v3
- name: Publish package
run: |
chmod +x gradlew
./gradlew publish
chmod +x gradlew
./gradlew :${{ steps.prod.outputs.module }}:publish
env:
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@
.externalNativeBuild
.cxx
local.properties

flowvault-samples/
Loading
Loading