From 6713f55635f8975a25591dbabefeab79df6d33c9 Mon Sep 17 00:00:00 2001 From: moi15moi <80980684+moi15moi@users.noreply.github.com> Date: Thu, 30 Oct 2025 20:58:20 -0400 Subject: [PATCH 1/2] Add a composite action to run autogen.sh This action will be reused in libass-android. --- .github/actions/setup-libraries/action.yml | 37 +++++++++++++++++++++ .github/workflows/{ci.yml => run_tests.yml} | 36 ++++++++------------ 2 files changed, 51 insertions(+), 22 deletions(-) create mode 100644 .github/actions/setup-libraries/action.yml rename .github/workflows/{ci.yml => run_tests.yml} (56%) diff --git a/.github/actions/setup-libraries/action.yml b/.github/actions/setup-libraries/action.yml new file mode 100644 index 0000000..97ce80f --- /dev/null +++ b/.github/actions/setup-libraries/action.yml @@ -0,0 +1,37 @@ +name: Setup Libraries +description: Runs autogen.sh in required folders +inputs: + libass-cmake-path: + description: Path of libass-cmake repos + required: true +runs: + using: "composite" + steps: + - name: Install dependencies + run: sudo apt install gperf gettext autopoint + shell: bash + + - name: Running autogen.sh in unibreak + working-directory: ${{ inputs.libass-cmake-path }}/src/unibreak + run: NOCONFIGURE=1 ./autogen.sh + shell: bash + + - name: Running autogen.sh in fribidi + working-directory: ${{ inputs.libass-cmake-path }}/src/fribidi + run: NOCONFIGURE=1 ./autogen.sh + shell: bash + + - name: Running autogen.sh in fontconfig + working-directory: ${{ inputs.libass-cmake-path }}/src/fontconfig + run: NOCONFIGURE=1 ./autogen.sh + shell: bash + + - name: Running autogen.sh in ass + working-directory: ${{ inputs.libass-cmake-path }}/src/ass + run: ./autogen.sh + shell: bash + + - name: Running buildconf.sh in expat + working-directory: ${{ inputs.libass-cmake-path }}/src/expat/expat + run: ./buildconf.sh + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/run_tests.yml similarity index 56% rename from .github/workflows/ci.yml rename to .github/workflows/run_tests.yml index 6116baa..9daff7b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/run_tests.yml @@ -5,6 +5,7 @@ on: branches: - master pull_request: + workflow_call: jobs: run-tests: @@ -21,28 +22,10 @@ jobs: with: submodules: true - - name: Install dependencies - run: sudo apt install gperf gettext autopoint - - - name: Running autogen.sh in unibreak - working-directory: src/unibreak - run: NOCONFIGURE=1 ./autogen.sh - - - name: Running autogen.sh in fribidi - working-directory: src/fribidi - run: NOCONFIGURE=1 ./autogen.sh - - - name: Running autogen.sh in fontconfig - working-directory: src/fontconfig - run: NOCONFIGURE=1 ./autogen.sh - - - name: Running autogen.sh in ass - working-directory: src/ass - run: ./autogen.sh - - - name: Running buildconf.sh in expat - working-directory: src/expat/expat - run: ./buildconf.sh + - name: Run setup-libraries composite action + uses: ./.github/actions/setup-libraries + with: + libass-cmake-path: ${{ github.workspace }} - name: Create build directory run: mkdir build @@ -61,3 +44,12 @@ jobs: - name: Build working-directory: build run: cmake --build . + + - uses: actions/upload-artifact@v5 + with: + name: build-${{ matrix.ANDROID_ABI }} + path: | + build/etc/ + build/include/ + build/lib/ + build/share/ From 144e88d5918576d4aed0a404469109f397d3ad66 Mon Sep 17 00:00:00 2001 From: moi15moi <80980684+moi15moi@users.noreply.github.com> Date: Thu, 30 Oct 2025 20:58:36 -0400 Subject: [PATCH 2/2] Add Publish Release job --- .github/workflows/release.yml | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..dfac933 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Publish Release + +on: + release: + types: [published] + +jobs: + call-run-tests: + uses: ./.github/workflows/run_tests.yml + + publish-release: + name: Publish Release + runs-on: ubuntu-latest + needs: call-run-tests + permissions: + contents: write + id-token: write + + steps: + - name: Download artifact + uses: actions/download-artifact@v6 + with: + path: artifacts + + - name: Create tarballs for each artifact + run: | + mkdir -p dist + for dir in artifacts/*; do + if [ -d "$dir" ]; then + name=$(basename "$dir") + tar_path="dist/${name}.tar.gz" + echo "Creating tarball $tar_path" + tar -czf "$tar_path" -C "$dir" . + fi + done + + - name: Upload artifact signatures to GitHub Release + env: + GITHUB_TOKEN: ${{ github.token }} + run: gh release upload '${{ github.ref_name }}' dist/*.tar.gz --repo '${{ github.repository }}'