mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: clone current branch instead of main
This commit is contained in:
parent
153072c019
commit
e6c582d4a4
78
.github/workflows/build.yml
vendored
78
.github/workflows/build.yml
vendored
@ -8,54 +8,54 @@ jobs:
|
|||||||
Build-LiteLoader:
|
Build-LiteLoader:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'NapNeko/NapCatQQ'
|
repository: 'NapNeko/NapCatQQ'
|
||||||
submodules: true
|
submodules: true
|
||||||
ref: main
|
ref: ${{ github.ref }}
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
token: ${{ secrets.NAPCAT_BUILD }}
|
||||||
- name: Use Node.js 20.X
|
- name: Use Node.js 20.X
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: Build NuCat Framework
|
- name: Build NuCat Framework
|
||||||
run: |
|
run: |
|
||||||
npm i
|
npm i
|
||||||
npm run build:framework
|
npm run build:framework
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev
|
npm i --omit=dev
|
||||||
rm package-lock.json
|
rm package-lock.json
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.Framework
|
name: NapCat.Framework
|
||||||
path: dist
|
path: dist
|
||||||
Build-Shell:
|
Build-Shell:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'NapNeko/NapCatQQ'
|
repository: 'NapNeko/NapCatQQ'
|
||||||
submodules: true
|
submodules: true
|
||||||
ref: main
|
ref: ${{ github.ref }}
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
token: ${{ secrets.NAPCAT_BUILD }}
|
||||||
- name: Use Node.js 20.X
|
- name: Use Node.js 20.X
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
- name: Build NuCat LiteLoader
|
- name: Build NuCat LiteLoader
|
||||||
run: |
|
run: |
|
||||||
npm i
|
npm i
|
||||||
npm run build:shell
|
npm run build:shell
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev
|
npm i --omit=dev
|
||||||
rm package-lock.json
|
rm package-lock.json
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.Shell
|
name: NapCat.Shell
|
||||||
path: dist
|
path: dist
|
||||||
|
162
.github/workflows/release.yml
vendored
162
.github/workflows/release.yml
vendored
@ -26,107 +26,107 @@ jobs:
|
|||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
- name: Check Version
|
- name: Check Version
|
||||||
run: |
|
run: |
|
||||||
ls
|
ls
|
||||||
node ./script/checkVersion.cjs
|
node ./script/checkVersion.cjs
|
||||||
sh ./checkVersion.sh
|
sh ./checkVersion.sh
|
||||||
Build-LiteLoader:
|
Build-LiteLoader:
|
||||||
needs: [check-version]
|
needs: [ check-version ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'NapNeko/NapCatQQ'
|
repository: 'NapNeko/NapCatQQ'
|
||||||
submodules: true
|
submodules: true
|
||||||
ref: main
|
ref: main
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
token: ${{ secrets.NAPCAT_BUILD }}
|
||||||
- name: Use Node.js 20.X
|
- name: Use Node.js 20.X
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
- name: Build NuCat Framework
|
- name: Build NuCat Framework
|
||||||
run: |
|
run: |
|
||||||
npm i
|
npm i
|
||||||
npm run build:framework
|
npm run build:framework
|
||||||
cd dist
|
cd dist
|
||||||
npm i --omit=dev
|
npm i --omit=dev
|
||||||
cd ..
|
cd ..
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: NapCat.Framework
|
name: NapCat.Framework
|
||||||
path: dist
|
path: dist
|
||||||
Build-Shell:
|
Build-Shell:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [check-version]
|
needs: [ check-version ]
|
||||||
steps:
|
steps:
|
||||||
- name: Clone Main Repository
|
- name: Clone Main Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
repository: 'NapNeko/NapCatQQ'
|
repository: 'NapNeko/NapCatQQ'
|
||||||
submodules: true
|
submodules: true
|
||||||
ref: main
|
ref: main
|
||||||
token: ${{ secrets.NAPCAT_BUILD }}
|
token: ${{ secrets.NAPCAT_BUILD }}
|
||||||
|
|
||||||
- name: Use Node.js 20.X
|
- name: Use Node.js 20.X
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.x
|
node-version: 20.x
|
||||||
|
|
||||||
- name: Build NuCat Shell
|
|
||||||
run: |
|
|
||||||
npm i
|
|
||||||
npm run build:shell
|
|
||||||
cd dist
|
|
||||||
npm i --omit=dev
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Build NuCat Shell
|
||||||
uses: actions/upload-artifact@v4
|
run: |
|
||||||
with:
|
npm i
|
||||||
name: NapCat.Shell
|
npm run build:shell
|
||||||
path: dist
|
cd dist
|
||||||
|
npm i --omit=dev
|
||||||
|
cd ..
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: NapCat.Shell
|
||||||
|
path: dist
|
||||||
|
|
||||||
release-napcat:
|
release-napcat:
|
||||||
needs: [Build-LiteLoader,Build-Shell]
|
needs: [ Build-LiteLoader,Build-Shell ]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Download All Artifact
|
- name: Download All Artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
# - name: Compress subdirectories
|
# - name: Compress subdirectories
|
||||||
# run: |
|
# run: |
|
||||||
# cd ./NapCat.Shell/
|
# cd ./NapCat.Shell/
|
||||||
# zip -q -r NapCat.Shell.zip *
|
# zip -q -r NapCat.Shell.zip *
|
||||||
# cd ..
|
# cd ..
|
||||||
# rm ./NapCat.Shell.zip -rf
|
# rm ./NapCat.Shell.zip -rf
|
||||||
# mv ./NapCat.Shell/NapCat.Shell.zip ./
|
# mv ./NapCat.Shell/NapCat.Shell.zip ./
|
||||||
- name: Compress subdirectories
|
- name: Compress subdirectories
|
||||||
run: |
|
run: |
|
||||||
cd ./NapCat.Shell/
|
cd ./NapCat.Shell/
|
||||||
zip -q -r NapCat.Shell.zip *
|
zip -q -r NapCat.Shell.zip *
|
||||||
cd ..
|
cd ..
|
||||||
cd ./NapCat.Framework/
|
cd ./NapCat.Framework/
|
||||||
zip -q -r NapCat.Framework.zip *
|
zip -q -r NapCat.Framework.zip *
|
||||||
cd ..
|
cd ..
|
||||||
rm ./NapCat.Shell.zip -rf
|
rm ./NapCat.Shell.zip -rf
|
||||||
rm ./NapCat.Framework.zip -rf
|
rm ./NapCat.Framework.zip -rf
|
||||||
mv ./NapCat.Shell/NapCat.Shell.zip ./
|
mv ./NapCat.Shell/NapCat.Shell.zip ./
|
||||||
mv ./NapCat.Framework/NapCat.Framework.zip ./
|
mv ./NapCat.Framework/NapCat.Framework.zip ./
|
||||||
- name: Extract version from tag
|
- name: Extract version from tag
|
||||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Clone Changes Log
|
- name: Clone Changes Log
|
||||||
run: curl -o CHANGELOG.md https://fastly.jsdelivr.net/gh/NapNeko/NapCatQQ@main/docs/changelogs/CHANGELOG.v${{ env.VERSION }}.md
|
run: curl -o CHANGELOG.md https://fastly.jsdelivr.net/gh/NapNeko/NapCatQQ@main/docs/changelogs/CHANGELOG.v${{ env.VERSION }}.md
|
||||||
|
|
||||||
- name: Create Release Draft and Upload Artifacts
|
- name: Create Release Draft and Upload Artifacts
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
name: NapCat V${{ env.VERSION }}
|
name: NapCat V${{ env.VERSION }}
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
body_path: CHANGELOG.md
|
body_path: CHANGELOG.md
|
||||||
files: |
|
files: |
|
||||||
NapCat.Framework.zip
|
NapCat.Framework.zip
|
||||||
NapCat.Shell.zip
|
NapCat.Shell.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user