更新 maven-publish.yml

This commit is contained in:
Yang Yang
2024-02-23 10:59:54 +08:00
committed by GitHub
parent f779bc491a
commit d66f2a939e

View File

@@ -54,11 +54,12 @@ jobs:
- name: Build native image with Maven
run: |
./mvnw native:compile -Pnative
if [ "${{ matrix.os }}" == "windows-latest" ]; then
if ("${{ matrix.os }}" -eq "windows-latest") {
mv ./target/gpt-4-copilot.exe ./target/gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}.exe
else
} else {
mv ./target/gpt-4-copilot ./target/gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}
fi
}
shell: pwsh
- name: Check if release exists
id: check_release
@@ -92,6 +93,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.check_release.outputs.exists == 'true' && steps.check_release.outputs.upload_url || steps.create_release.outputs.upload_url }}
asset_path: ./target/gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}
asset_name: gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}
asset_path: ./target/gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}${{ matrix.os == 'windows-latest' ? '.exe' : '' }}
asset_name: gpt-4-copilot-${{ steps.tag_name.outputs.tag }}-${{ matrix.os }}${{ matrix.os == 'windows-latest' ? '.exe' : '' }}
asset_content_type: application/octet-stream