更新 maven-publish.yml

This commit is contained in:
Yang Yang
2024-02-23 02:12:44 +08:00
committed by GitHub
parent b89bc35a30
commit 744a487fbd

View File

@@ -4,7 +4,6 @@ on:
push:
branches:
- main
pull_request:
jobs:
build:
@@ -38,9 +37,23 @@ jobs:
- name: Build native image with Maven
run: ./mvnw native:compile -Pnative
- name: Upload native image from target folder
uses: actions/upload-artifact@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: gpt-4-copilot
path: target/gpt-4-copilot # Replace your-binary-name with the actual name of your binary file
tag_name: ${{ github.run_number }}
release_name: Release ${{ github.run_number }}
draft: false
prerelease: false
- name: Upload native image to Release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/gpt-4-copilot # Make sure this is the correct path to your built artifact
asset_name: gpt-4-copilot # Make sure this is the correct name of your built artifact
asset_content_type: application/octet-stream