Skip to content

CI

CI #75

Workflow file for this run

name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push events
push:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
contents: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: temurin
- name: Build the release artifacts
run: |
set -x
unset ANDROID_SDK_ROOT
cd buildscripts
./download.sh > /dev/null
./buildall.sh --arch x86 mpv
./buildall.sh --arch x86_64 mpv
./buildall.sh --arch arm64 mpv
./buildall.sh
env:
GRADLE_OPTS: "-Xmx1G"
- name: Get tag name
if: startsWith(github.ref, 'refs/tags/')
run: |
set -x
echo "VERSION_TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Copy build artifacts
if: startsWith(github.ref, 'refs/tags/')
run: |
set -e
mv app/build/outputs/aar/app-default-release.aar aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/[email protected]
with:
tag_name: ${{ env.VERSION_TAG }}
name: aniyomi-mpv-lib ${{ env.VERSION_TAG }}
body: |
library version ${{ env.VERSION_TAG }}
files: |
aniyomi-mpv-lib-${{ env.VERSION_TAG }}.aar
draft: false
prerelease: false