update agents detail #11
Workflow file for this run
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: | |
| tags: | |
| - 'v**' | |
| # Ensure only one release workflow runs at a time | |
| concurrency: | |
| group: release-${{ github.ref }} | |
| cancel-in-progress: false | |
| env: | |
| JAVA_VERSION: '21' | |
| JAVA_DISTRIBUTION: 'temurin' | |
| GRADLE_VERSION: '8.14' | |
| jobs: | |
| # Run tests | |
| test: | |
| name: Test on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, ubuntu-latest, windows-latest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Java ${{ env.JAVA_VERSION }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: ${{ env.JAVA_DISTRIBUTION }} | |
| java-version: ${{ env.JAVA_VERSION }} | |
| cache: 'gradle' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| gradle-version: ${{ env.GRADLE_VERSION }} | |
| - name: Run all tests | |
| run: gradle allTests --no-daemon --stacktrace | |
| - name: Upload test reports (on failure) | |
| if: failure() | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: test-reports-${{ matrix.os }} | |
| path: | | |
| **/build/reports/tests/ | |
| **/build/test-results/ | |
| retention-days: 7 | |
| # Build all platform binaries and package plugin bundles | |
| build: | |
| name: Build and package all platforms | |
| needs: test | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Extract version from tag | |
| id: version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/v} | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Extracted version: $VERSION" | |
| - name: Set up Java ${{ env.JAVA_VERSION }} | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: ${{ env.JAVA_DISTRIBUTION }} | |
| java-version: ${{ env.JAVA_VERSION }} | |
| cache: 'gradle' | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v5 | |
| with: | |
| gradle-version: ${{ env.GRADLE_VERSION }} | |
| - name: Build all platform binaries | |
| run: gradle :codex-kkp-cli:linkReleaseExecutableMultiplatform --no-daemon --stacktrace | |
| - name: Package all plugin bundles | |
| run: ./gradlew :codex-kkp-cli:packageAllSkills -Pversion=${{ steps.version.outputs.version }} --no-daemon --stacktrace | |
| - name: List plugins | |
| run: | | |
| echo "Release plugins prepared:" | |
| ls -lh codex-kkp-cli/build/plugins/ | |
| - name: List release artifacts | |
| run: | | |
| echo "Release artifacts prepared:" | |
| ls -lh codex-kkp-cli/build/pluginsReleases/ | |
| - name: Upload release artifacts | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: release-artifacts | |
| path: codex-kkp-cli/build/pluginsReleases/* | |
| retention-days: 7 | |
| - name: Upload plugin directories | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: marketplace-directories | |
| path: codex-kkp-cli/build/marketplace/ | |
| include-hidden-files: true | |
| retention-days: 7 | |
| outputs: | |
| version: ${{ steps.version.outputs.version }} | |
| # Commit to plugins branch | |
| commit-to-plugins-branch: | |
| name: Update plugins branch | |
| needs: build | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Download plugin directories | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: marketplace-directories | |
| path: marketplace-temp/ | |
| - name: Deploy to plugins branch | |
| id: deploy | |
| # uses: stefanzweifel/git-auto-commit-action@v7 | |
| # with: | |
| # commit_message: 'Update Plugins ${{ github.ref_name }}' | |
| # branch: plugins/release | |
| # push_options: '--force' | |
| # file_pattern: 'marketplace-temp/*' | |
| # skip_fetch: true | |
| # skip_checkout: true | |
| # create_branch: true | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: plugins/release | |
| folder: marketplace-temp | |
| clean: true | |
| commit-message: "Release plugins ${{ github.ref_name }} from ${{ github.sha }}" | |
| single-commit: false | |
| force: true | |
| - name: Get plugins branch commit SHA | |
| id: get_sha | |
| run: | | |
| git fetch origin plugins/release | |
| PLUGINS_SHA=$(git rev-parse origin/plugins/release) | |
| echo "sha=$PLUGINS_SHA" >> $GITHUB_OUTPUT | |
| echo "Plugins branch commit SHA: $PLUGINS_SHA" | |
| outputs: | |
| plugins_commit_sha: ${{ steps.get_sha.outputs.sha }} | |
| # Create GitHub Release | |
| create-release: | |
| name: Create GitHub Release | |
| needs: [build, commit-to-plugins-branch] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Download release artifacts | |
| uses: actions/download-artifact@v6 | |
| with: | |
| name: release-artifacts | |
| path: release-assets/ | |
| - name: List release assets | |
| run: | | |
| echo "Release assets:" | |
| ls -lh release-assets/ | |
| - name: Generate release notes | |
| id: release_notes | |
| run: | | |
| cat > release_notes.md << 'EOF' | |
| ## Codex Agent Collaboration v${{ needs.build.outputs.version }} | |
| ### Installation | |
| **${{ github.ref_name }} Marketplace Commit:** ${{ needs.commit-to-plugins-branch.outputs.plugins_commit_sha }} | |
| **Download the ${{ github.ref_name }} of the product**: [Download](https://github.com/ForteScarlet/codex-kkp/archive/${{ needs.commit-to-plugins-branch.outputs.plugins_commit_sha }}.zip) | |
| or download [codex-agent-collaboration-marketplace.zip](https://github.com/ForteScarlet/codex-kkp/releases/download/${{ github.ref_name }}/codex-agent-collaboration-marketplace.zip) from release's assets. | |
| EOF | |
| cat release_notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: Release ${{ github.ref_name }} | |
| body_path: release_notes.md | |
| files: release-assets/* | |
| draft: false | |
| prerelease: false | |
| fail_on_unmatched_files: true | |
| generate_release_notes: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Release summary | |
| run: | | |
| echo "✅ Release ${{ github.ref_name }} created successfully!" | |
| echo "" | |
| echo "📦 Release Assets:" | |
| ls -lh release-assets/ | tail -n +2 | |
| echo "" | |
| echo "🌿 Plugins Branch: ${{ needs.commit-to-plugins-branch.outputs.plugins_commit_sha }}" | |
| echo "🔗 Release URL: ${{ github.server_url }}/${{ github.repository }}/releases/tag/${{ github.ref_name }}" |