Update dependencies and tools to target API 33 #630
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
tags: | |
- "v*" | |
pull_request: | |
paths-ignore: | |
- "README.md" | |
- "architecture.md" | |
- 'CHANGELOG.md' | |
- 'CONTRIBUTING.md' | |
branches-ignore: | |
- 'bttv/l10n_master' | |
workflow_dispatch: {} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# checkout current state of repo | |
- uses: actions/checkout@v3 | |
# set env variables | |
- name: set variables | |
run: | | |
echo "APK_URL=https://www.dropbox.com/scl/fi/mlm7vzjy7da4g9wp72gzl/twitch-17.9.0.apk\?rlkey=b5fedom0wslvlyxkjkmrf9xt3\&st=kjpp5ly3\&dl=1" >> $GITHUB_ENV | |
# get keystore.kjs from secret | |
- name: create keystore.kjs from secret | |
run: echo "${{ secrets.KEYSTORE }}" | base64 -d > keystore.jks | |
# download apk when cache miss | |
- name: download base | |
if: steps.apk-cache.outputs.cache-hit != 'true' | |
run: wget ${{ env.APK_URL }} -O twitch.apk | |
# run the build using docker container | |
- name: run build | |
run: | | |
docker run --rm \ | |
-v $(pwd)/twitch.apk:/usr/build/twitch.apk \ | |
-v $(pwd)/bttv.manifest.json:/usr/build/bttv.manifest.json \ | |
-v $(pwd)/dist:/usr/build/dist \ | |
-v $(pwd)/mod:/usr/build/mod \ | |
-v $(pwd)/patches:/usr/build/patches \ | |
-v $(pwd)/.all-contributorsrc:/usr/build/.all-contributorsrc \ | |
-v $(pwd)/keystore.jks:/usr/build/keystore.jks \ | |
-e KS=/usr/build/keystore.jks \ | |
-e KSPASS=${{ secrets.KSPASS }} \ | |
ghcr.io/bttv-android/builder | |
# print checksums so anybody can confirm legitimacy of their apk | |
- name: print checksums | |
run: cp dist/twitch.apk bttv.apk && shasum *.apk | |
# send to other release job if needed | |
- uses: actions/upload-artifact@v2 | |
if: ${{ github.event_name != 'pull_request' }} | |
with: | |
name: bttv-apk | |
path: bttv.apk | |
retention-days: 1 | |
release: | |
needs: build | |
if: github.event_name != 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get CHANGELOGA | |
id: changelog | |
run: | | |
echo "RELEASE_BODY<<EOF" > /tmp/bttv && | |
head -n25 CHANGELOG.md >> /tmp/bttv && | |
echo "EOF" >> /tmp/bttv && | |
cat /tmp/bttv >> $GITHUB_OUTPUT | |
- uses: actions/download-artifact@v2 | |
with: | |
name: bttv-apk | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: ${{ steps.changelog.outputs.RELEASE_BODY }} | |
draft: true | |
prerelease: false | |
- id: version_tag | |
run: echo "version_tag=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT | |
- name: upload Release Apk | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./bttv.apk | |
asset_name: bttv-${{ steps.version_tag.outputs.version_tag }}.apk | |
asset_content_type: application/vnd.android.package-archive |