Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
ahai-code committed Apr 1, 2024
1 parent 395c27e commit d4eec29
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags: [ 'v*' ]

permissions:
contents: write

jobs:
generate-manifest-json:
runs-on: ubuntu-latest
Expand All @@ -29,7 +32,7 @@ jobs:
sudo lua -e '
require("metadata");
local dkjson = require("dkjson");
PLUGIN.downloadUrl = "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 Down Expand Up @@ -57,7 +60,7 @@ jobs:
with:
type: "zip"
directory: "./"
filename: "${{ env.REPO_NAME }}_${{ env.VERSION }}.zip"
filename: "${{ env.REPO_NAME }}-${{ env.VERSION }}.zip"
exclusions: "*.git* manifest.json"
- name: Publish release
uses: svenstaro/upload-release-action@v2
Expand All @@ -73,4 +76,4 @@ jobs:
file: ./manifest.json
tag: "manifest"
overwrite: true
file_glob: true
file_glob: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ Node.js plugin for [vfox](https://vfox.lhan.me/).
After installing [vfox](https://github.com/version-fox/vfox), install the plugin by running:

```bash
vfox install nodejs
vfox add nodejs
```

4 changes: 2 additions & 2 deletions metadata.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PLUGIN = {}
--- Plugin name
PLUGIN.name = "nodejs"
--- Plugin version
PLUGIN.version = "0.0.5"
PLUGIN.version = "0.1.1"
--- Plugin repository
PLUGIN.homepage = "https://github.com/version-fox/vfox-nodejs"
--- Plugin license
Expand All @@ -15,7 +15,7 @@ PLUGIN.description = "Node.js runtime environment."

--- !!! OPTIONAL !!!
-- minimum compatible vfox version
PLUGIN.minRuntimeVersion = "0.2.6"
PLUGIN.minRuntimeVersion = "0.3.0"
-- Some things that need user to be attention!
PLUGIN.notes = {}

0 comments on commit d4eec29

Please sign in to comment.