diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 0abe662..fa63881 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -29,7 +29,7 @@ jobs: sudo lua -e ' require("metadata"); local dkjson = require("dkjson"); - PLUGIN.download_url = "https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/${{ env.REPO_NAME }}_${{ env.VERSION }}.zip"; + PLUGIN.downloadUrl = "https://github.com/${{ github.repository }}/releases/download/v${{ env.VERSION }}/${{ env.REPO_NAME }}_${{ env.VERSION }}.zip"; local str = dkjson.encode(PLUGIN); print(str)' > manifest.json cat manifest.json @@ -39,9 +39,9 @@ jobs: name: manifest path: manifest.json release-plugin-and-manifest: - needs: generate-manifest-json - runs-on: ubuntu-latest - steps: + needs: generate-manifest-json + runs-on: ubuntu-latest + steps: - name: Set repo name run: | echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV @@ -58,7 +58,7 @@ jobs: type: "zip" directory: "./" filename: "${{ env.REPO_NAME }}_${{ env.VERSION }}.zip" - exclusions: "*.git* " + exclusions: "*.git* manifest.json" - name: Publish release uses: svenstaro/upload-release-action@v2 with: diff --git a/README.md b/README.md index 5f50b89..3524083 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,12 @@ -# vfox-plugin-template +# vfox-nodejs -This is a [vfox plugin](https://vfox.lhan.me/plugins/create/howto.html) template with CI that package and publish the plugin. +Node.js plugin for [vfox](https://vfox.lhan.me/). -## Usage +## Install -1. [Generate](https://github.com/version-fox/vfox-plugin-template/generate) a new repository based on this template. -2. Configure [metadata](https://github.com/version-fox/vfox-plugin-template/blob/main/metadata.lua) information -3. To develop your plugin further, please read [the plugins create section of the docs](https://vfox.lhan.me/plugins/create/howto.html). +After installing [vfox](https://github.com/version-fox/vfox), install the plugin by running: +```bash +vfox install nodejs +``` -## How to publish? - -1. Push a new tag to the repository which name is `vX.Y.Z` (X.Y.Z is the version number). -2. The CI will automatically package, then publish [release](https://github.com/version-fox/vfox-plugin-template/releases/tag/v0.0.1) and publish [manifest](https://github.com/version-fox/vfox-plugin-template/releases/tag/manifest). diff --git a/hooks/post_install.lua b/hooks/post_install.lua deleted file mode 100644 index f526167..0000000 --- a/hooks/post_install.lua +++ /dev/null @@ -1,12 +0,0 @@ ---- Extension point, called after PreInstall, can perform additional operations, ---- such as file operations for the SDK installation directory or compile source code ---- Currently can be left unimplemented! -function PLUGIN:PostInstall(ctx) - --- ctx.rootPath SDK installation directory - local rootPath = ctx.rootPath - local runtimeVersion = ctx.runtimeVersion - local sdkInfo = ctx.sdkInfo['nodejs'] - local path = sdkInfo.path - local version = sdkInfo.version - local name = sdkInfo.name -end \ No newline at end of file diff --git a/metadata.lua b/metadata.lua index ddc0a67..5056fc1 100644 --- a/metadata.lua +++ b/metadata.lua @@ -4,18 +4,18 @@ PLUGIN = {} --- !!! MUST BE SET !!! --- Plugin name PLUGIN.name = "nodejs" ---- Plugin author -PLUGIN.author = "Aooohan" --- Plugin version PLUGIN.version = "0.0.4" --- Plugin repository PLUGIN.homepage = "https://github.com/version-fox/vfox-nodejs" --- Plugin license -PLUGIN.license = "MIT" +PLUGIN.license = "Apache 2.0" --- Plugin description -PLUGIN.description = "Node.js" +PLUGIN.description = "Node.js runtime environment." --- !!! OPTIONAL !!! -- minimum compatible vfox version -PLUGIN.minRuntimeVersion = "0.2.2" +PLUGIN.minRuntimeVersion = "0.2.6" +-- Some things that need user to be attention! +PLUGIN.notes = {}