Skip to content

Commit

Permalink
github/workflows: build windows executable for tags
Browse files Browse the repository at this point in the history
  • Loading branch information
anyc committed Feb 2, 2024
1 parent f0231f2 commit deb9b0d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/avcut_tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,38 @@ jobs:
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
echo "::set-output name=debarch::$(dpkg --print-architecture)"
echo "::set-output name=archive_file::avcut_$(make version)_$(dpkg --print-architecture).tgz"
echo "::set-output name=ffmpeg_build_date::2024-02-01-12-46"
echo "::set-output name=ffmpeg_name::ffmpeg-n5.1.4-2-gdd885ab2f5-win64-gpl-shared-5.1"
id: avcut_variables

- name: Install mingw
run: |
sudo apt-get install -y mingw-w64-i686-dev mingw-w64-tools mingw-w64 pkg-config
- name: fetch ffmpeg4win
run: |
wget "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-${{ steps.avcut_variables.outputs.ffmpeg_build_date }}/${{ steps.avcut_variables.outputs.ffmpeg_name }}.zip"
unzip ${{ steps.avcut_variables.outputs.ffmpeg_name }}.zip
- name: make
run: >
PKG_CONFIG_PATH=${{ steps.avcut_variables.outputs.ffmpeg_name }}/lib/pkgconfig/
PKG_CONFIG_SYSROOT=${{ steps.avcut_variables.outputs.ffmpeg_name }}/
make CROSS_COMPILE=x86_64-w64-mingw32- ;
ls -lsh avcut.exe;
mv avcut.exe avcut-${{ steps.avcut_variables.outputs.avcut_version }}.${{ steps.avcut_variables.outputs.sha_short }}.exe;
- name: wininfo
run: >
echo "Download: https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-${{ steps.avcut_variables.outputs.ffmpeg_build_date }}/${{ steps.avcut_variables.outputs.ffmpeg_name }}.zip" > avcut_ffmpeg_libs_url.txt;
echo "and put the DLLs from the bin directory into the same folder as avcut." >> avcut_ffmpeg_libs_url.txt;
- name: make
run: make
- name: make
run: |
mkdir destdir
make install DESTDIR=destdir
tar -C destdir -czf ${{ steps.avcut_variables.outputs.archive_file }} .
- name: release
uses: actions/create-release@v1
id: create_release
Expand All @@ -40,6 +64,7 @@ jobs:
#body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: upload linux artifact
uses: actions/upload-release-asset@v1
env:
Expand Down Expand Up @@ -77,3 +102,22 @@ jobs:
asset_path: ./ChangeLog.txt
asset_name: ChangeLog.txt
asset_content_type: text/markdown

- name: upload avcut.exe artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./avcut-${{ steps.avcut_variables.outputs.avcut_version }}.${{ steps.avcut_variables.outputs.sha_short }}.exe
asset_name: avcut-${{ steps.avcut_variables.outputs.avcut_version }}.${{ steps.avcut_variables.outputs.sha_short }}.exe
asset_content_type: application/vnd.microsoft.portable-executable
- name: upload avcut.exe description artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./avcut_ffmpeg_libs_url.txt
asset_name: avcut_ffmpeg_libs_url.txt
asset_content_type: text/markdown

0 comments on commit deb9b0d

Please sign in to comment.