Repo created
This commit is contained in:
parent
893a13f448
commit
a787ef3a2f
7 changed files with 629 additions and 2 deletions
65
.github/workflows/build.yml
vendored
Normal file
65
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue