Skip to content

test: simple tests for some codecs #27

test: simple tests for some codecs

test: simple tests for some codecs #27

Workflow file for this run

name: Release Please
on:
push:
branches: ["main"]
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
major: ${{ steps.release.outputs.major }}
minor: ${{ steps.release.outputs.minor }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Release Please
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f
id: release
with:
config-file: .github/release-please.json
manifest-file: .github/manifest.json
tag:
runs-on: ubuntu-latest
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Tag major and minor versions
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
git tag -d v${{ needs.release-please.outputs.major }} || true
git tag -d v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true
git push origin :v${{ needs.release-please.outputs.major }} || true
git push origin :v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} || true
git tag -a v${{ needs.release-please.outputs.major }} -m "Release v${{ needs.release-please.outputs.major }}"
git tag -a v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }} -m "Release v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}"
git push origin v${{ needs.release-please.outputs.major }}
git push origin v${{ needs.release-please.outputs.major }}.${{ needs.release-please.outputs.minor }}
release:
name: Build and Release (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: release-please
if: ${{ needs.release-please.outputs.release_created }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-13, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install gpac and GStreamer
uses: ./.github/actions/deps
- name: Build
shell: bash
run: |
cmake -DCMAKE_BUILD_TYPE=Release -B build
cmake --build build -j
- name: Rename Shared Library
id: rename
shell: bash
run: |
OS_NAME=""
ARCH="$(uname -m)"
if [[ "${{ runner.os }}" == "Linux" ]]; then
OS_NAME="ubuntu_$(lsb_release -rs)"
EXT="so"
else
OS_NAME="macos_$(sw_vers -productVersion | cut -d '.' -f1,2)"
EXT="dylib"
fi
NEW_NAME="libgpac_plugin_${OS_NAME}_${ARCH}.${EXT}"
mv ./build/libgpac_plugin.${EXT} "./build/${NEW_NAME}"
echo "artifact=${NEW_NAME}" >> $GITHUB_OUTPUT
- name: Upload Release Artifact
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ./build/${{ steps.rename.outputs.artifact }} --clobber