Skip to content

Commit

Permalink
feat: 更新描述文件以及Ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bosens-China committed Nov 2, 2023
1 parent 546ae0f commit 2d9ae43
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get package.json info
id: get_package_info
run: |
echo "::set-output name=name::$(jq -r .name package.json)"
echo "::set-output name=version::$(jq -r .version package.json)"
- name: Zip dist/index.js
run: zip -r dist/index.zip dist/index.js

Expand All @@ -49,10 +55,9 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v1.0.0
release_name: Release v1.0.0
body: |
new zip
tag_name: ${{ steps.get_package_info.outputs.version }}
release_name: ${{ steps.get_package_info.outputs.name }} v${{ steps.get_package_info.outputs.version }}
body: New release
draft: false
prerelease: false

Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@
## 使用方式

目前因为账号限制,无法在 https://greasyfork.org/zh-CN 发布,所以只能手动拷贝使用。

```sh
# 方法一,直接拷贝dist/index.js 文件
# 方法二
git clone 当前项目
pnpm install
pnpm run build
# 重复方法一
# 方法三,点开网站点击安装 https://greasyfork.org/zh-CN/scripts/478865-boss%E5%A4%96%E5%8C%85%E5%85%AC%E5%8F%B8%E6%8F%90%E7%A4%BA
```

## 协议
Expand Down
9 changes: 8 additions & 1 deletion addNotes.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url);

const { name, version, author, description } = require("./package.json");
const {
name,
version,
author,
description,
license,
} = require("./package.json");

export default function addNotes() {
return {
Expand All @@ -17,6 +23,7 @@ export default function addNotes() {
// @match https://www.zhipin.com/job_detail/*
// @match http://www.zhipin.com/job_detail/*
// @grant none
// @license ${license}
// ==/UserScript==
`.trim();

Expand Down
2 changes: 2 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ export default {
commonjs(),
addNotes(),
esbuild({
minify: false,
target: "es2015",
loaders: {
".json": "json",
},
Expand Down

0 comments on commit 2d9ae43

Please sign in to comment.