fix libpciaccess #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ffmpeg-release | |
on: | |
push: | |
tags: | |
- v* | |
branches: [main] | |
jobs: | |
export: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
strategy: | |
matrix: | |
ffmpeg: ["7.0.2", "6.1.2", "5.1.6", "4.4.5"] | |
flavor: [linux, windows] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Set build target (linux) | |
if: matrix.flavor == 'linux' | |
run: | | |
echo "build_tag=ffmpeg-linux-export" >> $GITHUB_ENV | |
echo "target_os=linux-amd64" >> $GITHUB_ENV | |
- name: Set build target (windows) | |
if: matrix.flavor == 'windows' | |
run: | | |
echo "build_tag=ffmpeg-windows-export" >> $GITHUB_ENV | |
echo "target_os=windows-x64" >> $GITHUB_ENV | |
- name: Export - ffmpeg | |
run: | | |
docker buildx build --platform linux/amd64 --target ${{ env.build_tag }} --output type=local,dest=/tmp/build \ | |
-t ${{ env.build_tag }} --build-arg FFMPEG_VERSION=${{ matrix.ffmpeg }} -f ./Dockerfile . | |
- name: Archive artifact | |
run: | | |
mkdir /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }} | |
mv /tmp/build/* /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}/ | |
tar acvf /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}.tar.xz -C /tmp ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }} | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }} | |
path: /tmp/ffmpeg-${{ matrix.ffmpeg }}-${{ env.target_os }}.tar.xz | |
release: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/v') | |
needs: [export] | |
steps: | |
- name: Download artifact | |
uses: actions/download-artifact@v3 | |
with: | |
path: /tmp/artifact | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: /tmp/artifact/**/*.tar.xz |