-
-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (61 loc) · 1.75 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: build
on:
push:
branches: ["*"]
tags: ["*"]
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: windows-2019
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: msys2/setup-msys2@v2
with:
msystem: clang64
install: >-
base-devel
git
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-ninja
mingw-w64-clang-x86_64-mpv
update: true
- name: Build
shell: msys2 {0}
run: |
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_SHARED_LINKER_FLAGS="-static" \
-G Ninja ..
cmake --build .
- uses: actions/upload-artifact@v3
with:
name: menu
path: build/menu.dll
publish:
needs: build
runs-on: ubuntu-22.04
if: ${{ github.ref == 'refs/heads/main' || github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Zip files
run: zip -r menu.zip menu
- uses: rickstaa/action-create-tag@v1
if: ${{ github.ref == 'refs/heads/main' }}
with:
tag: dev
force_push_tag: true
- uses: ncipollo/release-action@v1
with:
commit: ${{ github.sha }}
tag: ${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
artifacts: "menu.zip"
allowUpdates: true
prerelease: ${{ github.ref == 'refs/heads/main' }}
name: ${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
body: |
https://github.com/tsl0922/mpv-menu-plugin#installation