From 7b253ef3c920f16610af305b0d53992e192f2a56 Mon Sep 17 00:00:00 2001 From: hanbowen Date: Thu, 16 Jun 2022 16:43:31 +0800 Subject: [PATCH] add ci --- .github/workflows/publish_release.yml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/publish_release.yml diff --git a/.github/workflows/publish_release.yml b/.github/workflows/publish_release.yml new file mode 100644 index 0000000..bd7bc01 --- /dev/null +++ b/.github/workflows/publish_release.yml @@ -0,0 +1,48 @@ +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + abi: [ "armeabi-v7a", "arm64-v8a", "x86", "x86_64" ] + fail-fast: true + steps: + - uses: actions/checkout@v2 + + - name: Setup the environment + run: | + sudo pip3 install meson==0.58.2 + sudo apt-get install nasm ninja-build + + - name: Executing the script + run: | + export ANDROID_SDK_HOME=$ANDROID_HOME + export ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME + ./ffmpeg-android-maker.sh -all-free -all-gpl -android=21 -abis=${{ matrix.abi }} + - name: Pack artifacts + run: tar -cf build.tar.gz build/ + + - name: Create Draft Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: + release_name: + draft: true + prerelease: false + + - uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./build.tar.gz + asset_name: build.tar.gz + asset_content_type: application/gz + + - uses: eregon/publish-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_id: ${{ steps.create_release.outputs.id }}