bromite-buildtools/.github/workflows/release.yaml

68 lines
2.1 KiB
YAML
Raw Normal View History

2022-01-17 19:38:04 +05:30
name: Release Bromite CI
2022-01-17 22:26:42 +05:30
permissions:
contents: write
2022-01-17 19:47:01 +05:30
2022-01-17 19:38:04 +05:30
on:
workflow_dispatch:
inputs:
sha:
description: 'uazo/bromite SHA'
required: true
default: '0a8ff322d6e9d738f7b2fa52618b178081bd100d'
build:
description: 'arch [arm64/x64]'
required: true
2022-01-17 19:47:37 +05:30
default: 'arm64'
2022-01-17 19:38:04 +05:30
type:
description: 'runner? [dev/ci]'
required: true
default: 'ci'
env:
BROMITE_SHA: ${{ github.event.inputs.sha }}
REMOVEDOCKERSUPPORT: true
USELOCALIMAGE: true
GOMAJOBS: 60
2022-01-17 21:57:11 +05:30
2022-01-17 19:38:04 +05:30
jobs:
release:
runs-on: ${{ github.event.inputs.type }}
env:
2022-10-17 12:33:42 +05:30
OUTPUTFILE: /storage/images/android/${{ github.event.inputs.build }}/${{ github.event.inputs.sha }}
2022-01-17 19:51:53 +05:30
APK: ${{ github.event.inputs.build }}_ChromePublic.apk
2022-01-17 19:38:04 +05:30
steps:
2022-01-17 21:57:11 +05:30
- name: Prepare container
run: |
wget https://github.com/ericchiang/pup/releases/download/v0.4.0/pup_v0.4.0_linux_amd64.zip
unzip pup_v0.4.0_linux_amd64.zip && rm pup_v0.4.0_linux_amd64.zip
2022-03-09 13:29:27 +05:30
BRANCH=$(curl https://github.com/uazo/bromite/branch_commits/$BROMITE_SHA | ./pup -p li.branch:last-child a text{} | xargs)
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
2022-01-17 21:57:11 +05:30
wget https://github.com/cli/cli/releases/download/v2.4.0/gh_2.4.0_linux_amd64.tar.gz
tar xfz gh_2.4.0_linux_amd64.tar.gz
2022-01-17 22:20:12 +05:30
- name: Checkout 'uazo/buildtools'
2022-01-17 21:57:11 +05:30
uses: actions/checkout@v2
with:
2022-01-17 22:21:07 +05:30
repository: 'uazo/bromite-buildtools'
2022-01-17 21:57:11 +05:30
path: 'bromite'
fetch-depth: 1
2022-01-17 19:51:53 +05:30
- name: Copy artifacts
shell: bash
run: |
2022-01-17 21:32:34 +05:30
sudo cp ${{ env.OUTPUTFILE }}/apks/ChromePublic.apk ChromePublic.apk
2022-01-17 19:51:53 +05:30
sudo chown runner ChromePublic.apk
2022-01-17 19:52:49 +05:30
mv ChromePublic.apk $APK
2022-01-17 19:51:53 +05:30
2022-01-17 21:32:34 +05:30
- name: Create release
2022-01-17 20:20:19 +05:30
shell: bash
run: |
2022-01-17 21:50:21 +05:30
echo ${{ secrets.GITHUB_TOKEN }} | gh_2.4.0_linux_amd64/bin/gh auth login --with-token
2022-01-17 21:37:22 +05:30
2022-01-17 21:57:11 +05:30
cd bromite
2022-01-17 22:03:18 +05:30
VERSION=v$(cat ${{ env.OUTPUTFILE }}/RELEASE)-${{ github.event.inputs.build }}
2022-01-19 12:53:03 +05:30
../gh_2.4.0_linux_amd64/bin/gh release create $VERSION-$BROMITE_SHA \
2022-03-25 15:52:15 +05:30
../$APK --notes "" -p