File tree 4 files changed +53
-0
lines changed
4 files changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ mkdir -p releases
2
+
3
+ echo 1212121
4
+
5
+ cd releases
6
+
7
+ curl -L \
8
+ -H " Accept: application/vnd.github.v3+json" \
9
+ -H " Authorization: token $GITHUB_TOKEN " \
10
+ " https://api.github.com/repos/$GITHUB_REPO /releases" \
11
+ -o releases.json
12
+
13
+ cat releases.json
14
+
15
+ hash=$( md5sum releases.json | cut -d ' ' -f 1)
16
+
17
+ echo " exports = require('./releases.json')" > index.js
18
+
19
+ echo ' {"name":"@koishijs/releases","version":"0.0.0-' $hash ' "}' > package.json
20
+
21
+ cat package.json
22
+
23
+ npm publish --access public --tag latest
Original file line number Diff line number Diff line change
1
+ name : Sync Release
2
+
3
+ on :
4
+ release :
5
+ workflow_dispatch :
6
+
7
+ jobs :
8
+ npm :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Set up Node
12
+ uses : actions/setup-node@v4
13
+ - name : Publish
14
+ run : bash .github/workflows/publish.sh
15
+ env :
16
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @root/koishi" ,
3
3
"version" : " 1.0.0" ,
4
+ "type" : " module" ,
4
5
"private" : true ,
5
6
"packageManager" :
" [email protected] " ,
6
7
"workspaces" : [
Original file line number Diff line number Diff line change
1
+ {
2
+ "extends" : " ./tsconfig.base" ,
3
+ "compilerOptions" : {
4
+ "rootDir" : " src" ,
5
+ "emitDeclarationOnly" : false ,
6
+ "noEmit" : true ,
7
+ "module" : " esnext" ,
8
+ "moduleResolution" : " bundler" ,
9
+ },
10
+ "include" : [
11
+ " scripts" ,
12
+ ],
13
+ }
You can’t perform that action at this time.
0 commit comments