Skip to content

Commit c909e73

Browse files
committed
fuck
1 parent 71e067e commit c909e73

File tree

4 files changed

+5
-403
lines changed

4 files changed

+5
-403
lines changed

.github/workflows/mpv_clang.yml

+3-102
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ on:
1010
description: 'Run custom command before building'
1111
required: false
1212
type: string
13-
sourceforge:
14-
description: 'Upload to Sourceforge'
15-
required: false
16-
default: false
17-
type: boolean
1813
github_release:
1914
description: 'Upload to Github release'
2015
required: false
@@ -38,7 +33,7 @@ jobs:
3833
env:
3934
BIT: ${{ matrix.bit }}
4035
container:
41-
image: docker://ghcr.io/shinchiro/archlinux:latest
36+
image: docker://ghcr.io/media-kit/archlinux:latest
4237
outputs:
4338
mpv_ver: ${{ steps.build_mpv_step.outputs.mpv_ver }}
4439
steps:
@@ -250,116 +245,22 @@ jobs:
250245
mv release_i686/* release_x86_64/* release_x86_64_v3/* release_aarch64/* release
251246
du -ah release/*
252247
253-
- name: Uploading packages to Sourceforge
254-
id: upload_packages_sf
255-
if: ${{ github.event.inputs.sourceforge == 'true' }}
256-
continue-on-error: true
257-
env:
258-
MPV_VER: ${{ needs.build_mpv.outputs.mpv_ver }}
259-
run: |
260-
mkdir -p /root/.ssh/
261-
echo "${{ secrets.SF_PRIVATE_KEY }}" > sf_key
262-
pubkey=$(cat <<END
263-
frs.sourceforge.net ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOQD35Ujalhh+JJkPvMckDlhu4dS7WH6NsOJ15iGCJLC
264-
END
265-
)
266-
echo $pubkey > /root/.ssh/known_hosts
267-
chmod 400 sf_key
268-
chmod -R 700 /root
269-
sftp -i sf_key [email protected]:/home/frs/project/mpv-player-windows <<END
270-
put release/mpv-dev* libmpv
271-
put release/mpv-i686* 32bit
272-
put release/mpv-x86_64-[!v3]* 64bit
273-
put release/mpv-x86_64-v3* 64bit-v3
274-
put release/mpv-$MPV_VER* release
275-
END
276-
277248
- name: Uploading packages to Github release
278249
id: upload_packages_gh
279250
if: ${{ github.event.inputs.github_release == 'true' && github.event.inputs.mpv_tarball == 'false' }}
280251
continue-on-error: true
281252
run: |
282253
short_date=$(date "+%Y%m%d")
283254
body=$(cat <<END
284-
![GitHub release (by tag)](https://img.shields.io/github/downloads/shinchiro/mpv-winbuild-cmake/$short_date/total?label=Downloads)
285-
286255
**Workflow run**: $GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID
287256
END
288257
)
289-
id=$(curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -X POST -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases -d @- <<END | jq -r '.id'
258+
id=$(curl -u media-kit:$GH_TOKEN $CURL_RETRIES -s -X POST -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/media-kit/libmpv-win32-video-cmake/releases -d @- <<END | jq -r '.id'
290259
{
291260
"tag_name": "$short_date",
292261
"name": "$short_date",
293262
"body": "$(echo ${body//$'\n'/'\n'})"
294263
}
295264
END
296265
)
297-
for file in release/*.7z; do curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -X POST -H "Accept: application/vnd.github.v3+json" -H "Content-Type: $(file -b --mime-type $file)" https://uploads.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/$id/assets?name=$(basename $file) --data-binary @$file; done
298-
299-
- name: Pruning tags
300-
continue-on-error: true
301-
run: |
302-
# Keep latest 30 tags/releases
303-
git fetch --tags
304-
tag_list=($(git tag | sort -r))
305-
old=${tag_list[@]:30}
306-
for tag in ${old[@]}; do
307-
id=$(curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -X GET -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/tags/$tag | jq -r '.id')
308-
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/releases/$id
309-
git tag -d $tag
310-
done
311-
git push --tags --prune https://shinchiro:[email protected]/shinchiro/mpv-winbuild-cmake
312-
313-
- name: Delete releases cache
314-
if: ${{ github.event.inputs.github_release == 'false' || steps.upload_packages_gh.outcome == 'success' }}
315-
run: |
316-
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_i686_key
317-
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_x86_64_key
318-
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_x86_64_v3_key
319-
curl -u shinchiro:$GH_TOKEN $CURL_RETRIES -s -o /dev/null -X DELETE -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/caches?key=$release_aarch64_key
320-
321-
call_workflow:
322-
name: Run mpv_gcc
323-
runs-on: ubuntu-latest
324-
needs: build_mpv
325-
env:
326-
GH_TOKEN: ${{ github.token }}
327-
GH_COMMAND: ${{ github.event.inputs.command }}
328-
steps:
329-
- name: Run mpv_gcc.yml
330-
run: |
331-
curl -u shinchiro:$GH_TOKEN -X POST -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/workflows/mpv_gcc.yml/dispatches -d @- <<EOF
332-
{
333-
"ref": "master",
334-
"inputs": {
335-
"sourceforge": "false",
336-
"github_release": "true",
337-
"mpv_tarball": "false",
338-
"command": "$GH_COMMAND"
339-
}
340-
}
341-
EOF
342-
343-
gist:
344-
name: Gist
345-
runs-on: ubuntu-latest
346-
needs: build_mpv
347-
if: ${{ always() }}
348-
env:
349-
GH_TOKEN: ${{ secrets.GIST_TOKEN }}
350-
RUN_ID: ${{ github.run_id }}
351-
steps:
352-
- name: Setup git credentials
353-
run: |
354-
git config --global user.name "github-actions"
355-
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
356-
357-
- name: Upload job logs to gist
358-
run: |
359-
url=$(curl -su shinchiro:$GH_TOKEN -X GET -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/shinchiro/mpv-winbuild-cmake/actions/runs/$RUN_ID/jobs | jq -r '.jobs[0] | .url')
360-
curl -sLu shinchiro:$GH_TOKEN -X GET -H "Accept: application/vnd.github.v3+json" $url/logs -o mpv_log
361-
git clone --depth 1 https://shinchiro:[email protected]/90308c6632c9010d03b325c9ca6a4b6f job_log
362-
cp -f mpv_log job_log/mpv_log
363-
git -C job_log add .
364-
git -C job_log commit --amend --no-edit
365-
git -C job_log push -f https://shinchiro:[email protected]/90308c6632c9010d03b325c9ca6a4b6f
266+
for file in release/*.7z; do curl -u media-kit:$GH_TOKEN $CURL_RETRIES -X POST -H "Accept: application/vnd.github.v3+json" -H "Content-Type: $(file -b --mime-type $file)" https://uploads.github.com/repos/media-kit/libmpv-win32-video-cmake/releases/$id/assets?name=$(basename $file) --data-binary @$file; done

0 commit comments

Comments
 (0)