Skip to content

Commit 45b0aed

Browse files
committed
update ci
1 parent 61dce5e commit 45b0aed

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/publish.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
tags: [ 'v*' ]
66

7+
permissions:
8+
contents: write
9+
710
jobs:
811
generate-manifest-json:
912
runs-on: ubuntu-latest
@@ -29,7 +32,7 @@ jobs:
2932
sudo lua -e '
3033
require("metadata");
3134
local dkjson = require("dkjson");
32-
PLUGIN.downloadUrl = "https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/${{ env.REPO_NAME }}_${{ env.VERSION }}.zip";
35+
PLUGIN.downloadUrl = "https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/${{ env.REPO_NAME }}-${{ env.VERSION }}.zip";
3336
local str = dkjson.encode(PLUGIN);
3437
print(str)' > manifest.json
3538
cat manifest.json
@@ -39,9 +42,9 @@ jobs:
3942
name: manifest
4043
path: manifest.json
4144
release-plugin-and-manifest:
42-
needs: generate-manifest-json
43-
runs-on: ubuntu-latest
44-
steps:
45+
needs: generate-manifest-json
46+
runs-on: ubuntu-latest
47+
steps:
4548
- name: Set repo name
4649
run: |
4750
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV
@@ -57,13 +60,13 @@ jobs:
5760
with:
5861
type: "zip"
5962
directory: "./"
60-
filename: "${{ env.REPO_NAME }}_${{ env.VERSION }}.zip"
63+
filename: "${{ env.REPO_NAME }}-${{ env.VERSION }}.zip"
6164
exclusions: "*.git* manifest.json"
6265
- name: Publish release
6366
uses: svenstaro/upload-release-action@v2
6467
with:
6568
repo_token: ${{ secrets.GITHUB_TOKEN }}
66-
file: ./${{ env.REPO_NAME }}_${{ env.VERSION }}.zip
69+
file: ./${{ env.REPO_NAME }}-${{ env.VERSION }}.zip
6770
tag: v${{ env.VERSION }}
6871
file_glob: true
6972
- name: Publish manifest

metadata.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PLUGIN = {}
55
--- Plugin name
66
PLUGIN.name = "java"
77
--- Plugin version
8-
PLUGIN.version = "0.1.0"
8+
PLUGIN.version = "0.1.1"
99
--- Plugin homepage
1010
PLUGIN.homepage = "https://github.com/version-fox/vfox-java"
1111
--- Plugin license, please choose a correct license according to your needs.

0 commit comments

Comments
 (0)