android-helium-browser/.github/workflows/build.yml
2026-06-16 23:35:30 +00:00

79 lines
2.5 KiB
YAML

name: Build
on:
workflow_dispatch:
inputs:
runner:
description: 'Runner'
required: true
type: string
default: 'self-hosted' # ubuntu-latest
schedule:
- cron: '0 0 */16 * *'
permissions:
contents: write
id-token: write
attestations: write
jobs:
build:
runs-on: ${{ github.event_name == 'workflow_dispatch' && inputs.runner || 'self-hosted' }}
steps:
- uses: actions/checkout@v5
with:
submodules: true
- name: Update
run: |
cd vanadium
git fetch --tags
git checkout $(git tag | sort -V | tail -n1)
cd ..
git add vanadium
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
if ! git diff --staged --quiet; then
git commit -am "update"
git push
fi
- name: Set ENV
run: |
chmod +x *.sh
echo "unix_time=$(date +%s)" >> $GITHUB_ENV
- name: Build
env:
DEBIAN_FRONTEND: noninteractive
LOCAL_TEST_JKS: ${{ secrets.LOCAL_TEST_JKS }}
STORE_TEST_JKS: ${{ secrets.STORE_TEST_JKS }}
run: |
./build.sh
- name: Set
run: |
export VERSION=$(find chromium/src/out/release -name '*arm64-v8a.apk' | sed 's/.*\///;s/\-arm64-v8a.apk$//')
echo "VERSION=$VERSION" >> $GITHUB_ENV
mv $(find chromium/src/out/release -name '*arm64-v8a.aab') $VERSION-${{ env.unix_time }}-arm64-v8a.aab
mv $(find chromium/src/out/release -name '*arm64-v8a.apk') $VERSION-${{ env.unix_time }}-arm64-v8a.apk
mv $(find chromium/src/out/release -name '*armeabi-v7a.apk') $VERSION-${{ env.unix_time }}-armeabi-v7a.apk
- name: Publish
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: v${{ env.VERSION }}
tag_name: v${{ env.VERSION }}
files: |
${{ env.VERSION }}-${{ env.unix_time }}-arm64-v8a.aab
${{ env.VERSION }}-${{ env.unix_time }}-arm64-v8a.apk
${{ env.VERSION }}-${{ env.unix_time }}-armeabi-v7a.apk
- name: Attest
uses: actions/attest-build-provenance@v4
with:
subject-path: |
${{ env.VERSION }}-${{ env.unix_time }}-arm64-v8a.aab
${{ env.VERSION }}-${{ env.unix_time }}-arm64-v8a.apk
${{ env.VERSION }}-${{ env.unix_time }}-armeabi-v7a.apk