@sansenjian/qq-music-api 2.0.0 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ name: Release
2
+
3
+ on:
4
+ workflow_dispatch
5
+
6
+ jobs:
7
+ release:
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ contents: read
11
+ packages: write
12
+ steps:
13
+ - uses: actions/checkout@v6
14
+
15
+ # 发布到 NPM Registry
16
+ - name: Setup Node.js for NPM
17
+ uses: actions/setup-node@v6
18
+ with:
19
+ node-version: 20
20
+ registry-url: 'https://registry.npmjs.org/'
21
+ - run: npm install
22
+ - name: Publish to NPM
23
+ run: npm publish --access public
24
+ env:
25
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
26
+
27
+ # 发布到 GitHub Packages
28
+ - name: Setup Node.js for GitHub Packages
29
+ uses: actions/setup-node@v6
30
+ with:
31
+ node-version: 20
32
+ registry-url: 'https://npm.pkg.github.com'
33
+ - name: Publish to GitHub Packages
34
+ run: npm publish --access public
35
+ env:
36
+ NODE_AUTH_TOKEN: ${{ github.token }}
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@sansenjian/qq-music-api",
3
- "version": "2.0.0",
3
+ "version": "2.0.5",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
4
7
  "description": "QQ Music API - QQ音乐API koa2实现",
5
8
  "main": "index.js",
6
9
  "scripts": {
@@ -1,26 +0,0 @@
1
- name: Publish to NPM
2
-
3
- on:
4
- release:
5
- types: [published]
6
-
7
- jobs:
8
- build-and-publish:
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout
12
- uses: actions/checkout@v4
13
-
14
- - name: Setup Node.js
15
- uses: actions/setup-node@v4
16
- with:
17
- node-version: '20'
18
- registry-url: 'https://registry.npmjs.org'
19
-
20
- - name: Install dependencies
21
- run: npm install
22
-
23
- - name: Publish to NPM
24
- run: npm publish --access public
25
- env:
26
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}