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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions .github/workflows/APK-Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
outputs:
sha: ${{ steps.rev.outputs.sha }}
version: ${{ steps.rev.outputs.version }}
release: ${{ steps.rev.outputs.release }}

steps:
- uses: actions/checkout@v6
Expand All @@ -45,6 +46,17 @@ jobs:
git tag -l 'apk-*' | xargs -r git tag -d
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
echo "version=$(git describe --tags --always | sed 's/^v\([0-9]\)/\1/')" >> "$GITHUB_OUTPUT"
# Release and APK name: wivrn-quest-MAJOR.MINOR.PATCH, where MAJOR.MINOR is the
# upstream release this fork is on and PATCH counts commits since its vMAJOR.MINOR
# tag, so it grows with every master commit.
TAG=$(git describe --tags --abbrev=0)
MM=$(echo "$TAG" | sed -E 's/^v?([0-9]+)\.([0-9]+).*/\1.\2/')
if ! [[ "$MM" =~ ^[0-9]+\.[0-9]+$ ]]; then
echo "::error::cannot read MAJOR.MINOR from tag $TAG"
exit 1
fi
BASE=$(git rev-parse -q --verify "refs/tags/v$MM" || git rev-parse -q --verify "refs/tags/$MM" || echo "$TAG")
echo "release=wivrn-quest-$MM.$(git rev-list --count "$BASE..HEAD")" >> "$GITHUB_OUTPUT"

# Gradle distribution and the Android plugin's dependencies.
- uses: actions/cache@v5
Expand Down Expand Up @@ -95,7 +107,7 @@ jobs:
BUILD_TOOLS=$(find "$ANDROID_HOME/build-tools" -mindepth 1 -maxdepth 1 | sort -V | tail -1)
"$BUILD_TOOLS/apksigner" verify --print-certs "$APK"
mkdir apk
mv "$APK" apk/wivrn-xerktech-${{ steps.rev.outputs.sha }}.apk
mv "$APK" apk/${{ steps.rev.outputs.release }}.apk

- name: Archive APK
uses: actions/upload-artifact@v7
Expand Down Expand Up @@ -123,9 +135,9 @@ jobs:
with:
tag_name: "apk-${{ needs.build-android-only.outputs.sha }}"
target_commitish: ${{ needs.build-android-only.outputs.sha }}
name: "Quest APK ${{ needs.build-android-only.outputs.version }}"
name: ${{ needs.build-android-only.outputs.release }}
body: |
Signed Quest client built from ${{ needs.build-android-only.outputs.sha }}.
Signed Quest client ${{ needs.build-android-only.outputs.version }}, built from ${{ needs.build-android-only.outputs.sha }}.
Only connects to a wivrn-server built from this same commit.
Install: docs/xerktech-quest.md.
draft: false
Expand Down
4 changes: 3 additions & 1 deletion docs/xerktech-quest.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ APK, built from the same commit as the server.
commit in the same change. A mismatch fails at handshake.
- Releases are tagged `apk-<full commit sha>` on
<https://github.com/xerktech/WiVRn/releases>.
- Each release and its APK are named `wivrn-quest-MAJOR.MINOR.PATCH`: MAJOR.MINOR is the
upstream release (`vMAJOR.MINOR` tag) and PATCH the number of commits since that tag.

## Publishing an APK

Expand Down Expand Up @@ -52,7 +54,7 @@ The alias must be `default_key` (see `signingConfigs` in `build.gradle`).
```bash
SHA=<commit the server is built from>
gh release download "apk-$SHA" -R xerktech/WiVRn -p '*.apk'
adb install -r "wivrn-xerktech-$SHA.apk"
adb install -r wivrn-quest-*.apk
```

5. Launch it from Library → Applications → Unknown Sources → "WiVRn XerkTech".
Expand Down
Loading