From fb4294597db1346ad519b1ab96291916ca432c9a Mon Sep 17 00:00:00 2001 From: Shuanglei Tao Date: Sun, 24 Dec 2023 11:46:44 +0800 Subject: [PATCH] update workflow --- .github/workflows/build.yml | 12 ++++++++---- src/plugin.c | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b578647..15b2141 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,6 +3,7 @@ name: build on: push: branches: ["*"] + tags: ["*"] pull_request: workflow_dispatch: @@ -39,21 +40,24 @@ jobs: publish: needs: build runs-on: ubuntu-22.04 - if: ${{ github.ref == 'refs/heads/main' }} + 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: dev + tag: ${{ github.ref == 'refs/heads/main' && 'dev' || github.ref_name }} artifacts: "menu.zip" allowUpdates: true - name: Latest build - body: Latest build \ No newline at end of file + 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 \ No newline at end of file diff --git a/src/plugin.c b/src/plugin.c index 3c122ed..73f63d9 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -352,7 +352,7 @@ char *mp_expand_path(void *talloc_ctx, char *path) { mpv_node node; const char *args[] = {"expand-path", path, NULL}; if (mpv_command_ret(ctx->mpv, args, &node) >= 0) { - path = ta_strdup(talloc_ctx, node.u.string); + path = talloc_strdup(talloc_ctx, node.u.string); mpv_free_node_contents(&node); } return path;