Skip to content

Commit f9ae368

Browse files
KhoraLeeAniLeo
authored andcommitted
ci: create release for pre-built FFMPEG
1 parent 4620e55 commit f9ae368

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/build.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,37 @@ jobs:
7272
name: ffmpeg-${{ matrix.build }}-${{ matrix.arch }}
7373
path: ${{ matrix.vcpkg-root }}/packages/ffmpeg_${{ matrix.arch }}-${{ matrix.triplet }}/lib
7474
if: ${{ always() }}
75+
76+
create-release:
77+
needs: [build]
78+
runs-on: "ubuntu-20.04"
79+
if: github.ref == 'refs/heads/master'
80+
permissions:
81+
contents: write
82+
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- name: Download Artifacts
87+
uses: actions/download-artifact@v4
88+
89+
- name: Compute short git commit SHA
90+
run: |
91+
echo "COMMIT_SHORT_SHA=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_ENV
92+
echo ${{ env.COMMIT_SHORT_SHA }}
93+
94+
- name: Upload
95+
shell: bash
96+
run: |
97+
mkdir artifacts/
98+
files=$(find . -name "ffmpeg-*")
99+
for f in $files; do
100+
echo "Compressing $f"
101+
(cd $(basename $f) && zip -r ../artifacts/$(basename $f).zip *)
102+
done
103+
ls -al artifacts/
104+
wget -c https://github.com/tcnksm/ghr/releases/download/v0.14.0/ghr_v0.14.0_linux_amd64.tar.gz
105+
tar xfv ghr_v0.14.0_linux_amd64.tar.gz
106+
ghr_v0.14.0_linux_amd64/ghr -u Vita3K -r ffmpeg-core -n 'Automatic FFmpeg CI builds (${{ env.COMMIT_SHORT_SHA }})' -b "$(printf "Corresponding commit: ${{ github.sha }}")" ${{ env.COMMIT_SHORT_SHA }} artifacts/
107+
env:
108+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)