feat(agent): 增加记忆、文件索引及蒸馏功能支持 #26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| branches: [master] | |
| workflow_dispatch: | |
| inputs: | |
| version_bump: | |
| description: 'Version bump type (patch / minor / major)' | |
| required: false | |
| default: patch | |
| permissions: | |
| contents: write | |
| packages: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: '21' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x ./gradlew | |
| - name: Resolve next version | |
| id: ver | |
| run: | | |
| BUMP="${{ github.event.inputs.version_bump || 'patch' }}" | |
| LATEST=$(git tag --sort=-v:refname | head -n1) | |
| if [ -z "$LATEST" ]; then | |
| TAG="v0.1.0" | |
| else | |
| MAJOR=$(echo "$LATEST" | sed 's/v\([0-9]*\).*/\1/') | |
| MINOR=$(echo "$LATEST" | sed 's/v[0-9]*\.\([0-9]*\).*/\1/') | |
| PATCH=$(echo "$LATEST" | sed 's/v[0-9]*\.[0-9]*\.\([0-9]*\)/\1/') | |
| case "$BUMP" in | |
| major) MAJOR=$((MAJOR + 1)); MINOR=0; PATCH=0 ;; | |
| minor) MINOR=$((MINOR + 1)); PATCH=0 ;; | |
| *) PATCH=$((PATCH + 1)) ;; | |
| esac | |
| TAG="v${MAJOR}.${MINOR}.${PATCH}" | |
| fi | |
| VERSION="${TAG#v}" | |
| echo "tag=$TAG" >> "$GITHUB_OUTPUT" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "Next release: $TAG" | |
| - name: Build Vicky.jar | |
| run: ./gradlew shadowJar -Pversion=${{ steps.ver.outputs.version }} --no-daemon --stacktrace | |
| - name: Stage release artifact | |
| run: | | |
| mkdir -p release | |
| cp build/libs/Vicky-${{ steps.ver.outputs.version }}.jar "release/Vicky-${{ steps.ver.outputs.version }}.jar" | |
| - name: Create tag and GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ steps.ver.outputs.tag }} | |
| name: ${{ steps.ver.outputs.tag }} | |
| generate_release_notes: true | |
| files: | | |
| release/Vicky-${{ steps.ver.outputs.version }}.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish to GitHub Packages | |
| run: ./gradlew publish -Pversion=${{ steps.ver.outputs.version }} --no-daemon --stacktrace | |
| env: | |
| GITHUB_ACTOR: ${{ github.actor }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GITHUB_REPOSITORY: ${{ github.repository }} |