Skip to content

Commit fb42945

Browse files
committed
update workflow
1 parent e1a3f12 commit fb42945

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: build
33
on:
44
push:
55
branches: ["*"]
6+
tags: ["*"]
67
pull_request:
78
workflow_dispatch:
89

@@ -39,21 +40,24 @@ jobs:
3940
publish:
4041
needs: build
4142
runs-on: ubuntu-22.04
42-
if: ${{ github.ref == 'refs/heads/main' }}
43+
if: ${{ github.ref == 'refs/heads/main' || github.ref_type == 'tag' }}
4344
steps:
4445
- uses: actions/checkout@v3
4546
- uses: actions/download-artifact@v3
4647
- name: Zip files
4748
run: zip -r menu.zip menu
4849
- uses: rickstaa/action-create-tag@v1
50+
if: ${{ github.ref == 'refs/heads/main' }}
4951
with:
5052
tag: dev
5153
force_push_tag: true
5254
- uses: ncipollo/release-action@v1
5355
with:
5456
commit: ${{ github.sha }}
55-
tag: dev
57+
tag: ${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
5658
artifacts: "menu.zip"
5759
allowUpdates: true
58-
name: Latest build
59-
body: Latest build
60+
prerelease: ${{ github.ref == 'refs/heads/main' }}
61+
name: ${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }}
62+
body: |
63+
https://github.com/tsl0922/mpv-menu-plugin#installation

src/plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ char *mp_expand_path(void *talloc_ctx, char *path) {
352352
mpv_node node;
353353
const char *args[] = {"expand-path", path, NULL};
354354
if (mpv_command_ret(ctx->mpv, args, &node) >= 0) {
355-
path = ta_strdup(talloc_ctx, node.u.string);
355+
path = talloc_strdup(talloc_ctx, node.u.string);
356356
mpv_free_node_contents(&node);
357357
}
358358
return path;

0 commit comments

Comments
 (0)