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 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/Default/apks/release -name '*.apk' | sed 's/.*\///;s/\.apk$//') echo "VERSION=$VERSION" >> $GITHUB_ENV mv $(find chromium/src/out/Default/apks/release -name '*.apk') $VERSION-${{ env.unix_time }}.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 }}.apk