Skip to content

Enable libvorbis and libmp3lame encoders (#5) #27

Enable libvorbis and libmp3lame encoders (#5)

Enable libvorbis and libmp3lame encoders (#5) #27

Workflow file for this run

name: Build
on: [push, pull_request]
jobs:
build:
name: build-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
fail-fast: false
steps:
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Install Mac Dependencies
if: runner.os == 'macOS'
run: |
brew install nasm autoconf automake libtool
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: sudo apt-get install nasm autoconf automake libtool
- name: Install Windows Dependencies
if: runner.os == 'Windows'
shell: bash
run: |
C:\\msys64\\usr\\bin\\bash.exe -c 'export PATH="/usr/bin:/mingw64/bin:$PATH"; pacman -S --needed --noconfirm mingw-w64-x86_64-toolchain mingw-w64-x86_64-mpg123 mingw-w64-x86_64-gtk2 mingw-w64-x86_64-libogg mingw-w64-x86_64-libvorbis mingw-w64-x86_64-lame mingw-w64-x86_64-pkg-config nasm yasm make base-devel autoconf automake libtool'
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Run Cake
run: dotnet run --project ./build/Build.csproj --universalBinary=true
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
name: deploy
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
permissions:
packages: write
contents: write
needs: [ build ]
steps:
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Clone repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Rename License File
run: mv ./ffmpeg/COPYING.GPLv2 ./ffmpeg/LICENSE
- name: Run CAKE
run: dotnet run --project ./build/Build.csproj -- --target=Package --universalBinary=true --toolname=FFmpeg --executablename=ffmpeg --commandname=mgcb-ffmpeg --licensepath=ffmpeg/LICENSE
env:
ACTIONS_RUNTIME_TOKEN: ${{ env.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RUNTIME_URL: "${{ env.ACTIONS_RUNTIME_URL }}"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make a release
if: github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: 'MonoGame.Tool.FFmpeg ${{ github.ref_name }}'
tag: ${{ github.ref_name }}
allowUpdates: true
removeArtifacts: true
artifacts: "artifacts/**/*.nupkg"
token: ${{ secrets.GITHUB_TOKEN }}