File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed
Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ mkdir -p dist
2+ cd dist
3+
4+ curl -L \
5+ -H " Accept: application/vnd.github.v3+json" \
6+ -H " Authorization: token $GITHUB_TOKEN " \
7+ " https://api.github.com/repos/$GITHUB_REPO /releases?per_page=100" \
8+ -o releases.json
9+
10+ HASH=$( md5sum releases.json | cut -d ' ' -f 1)
11+ echo ' {"name":"@koishijs/releases","main":"releases.json"}' | jq " .version=\" 0.0.0-$HASH \" " > package.json
12+ cat package.json
13+
14+ 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+ publish :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Check out
12+ uses : actions/checkout@v4
13+
14+ - name : Set up Node
15+ uses : actions/setup-node@v4
16+
17+ - name : Set npm token
18+ run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
19+
20+ - name : Publish
21+ run : bash .github/workflows/publish.sh
22+ env :
23+ GITHUB_REPO : ${{ github.repository }}
24+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 11{
22 "name" : " @root/koishi" ,
33 "version" : " 1.0.0" ,
4+ "type" : " module" ,
45 "private" : true ,
56 "packageManager" :
" [email protected] " ,
67 "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