diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..115b69d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,41 @@ +name: Build and Release +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + container: + image: devatherock/graalvm:21-ol8 + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Build binaries + run: | + chmod +x ./mvnw + ./mvnw native:compile -Pnative + + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + draft: false + prerelease: false + + - name: Upload Release Asset + id: upload-release-asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./target/gpt4-copilot-java # 更新为你的二进制文件路径 + asset_name: gpt4-copilot-java # 更新为你的二进制文件名 + asset_content_type: application/octet-stream