Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aooohan committed Mar 26, 2024
1 parent bcbf342 commit efd3cf5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 32 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
17 changes: 7 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -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).
12 changes: 0 additions & 12 deletions hooks/post_install.lua

This file was deleted.

10 changes: 5 additions & 5 deletions metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

0 comments on commit efd3cf5

Please sign in to comment.