ci: upload exe in release assets
This commit is contained in:
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -35,6 +35,7 @@ jobs:
|
|||||||
needs: test
|
needs: test
|
||||||
env:
|
env:
|
||||||
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
|
RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
|
||||||
|
EXE_NAME: lingma-ipc-proxy_${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}_windows_amd64.exe
|
||||||
ARCHIVE_NAME: lingma-ipc-proxy_${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}_windows_amd64.zip
|
ARCHIVE_NAME: lingma-ipc-proxy_${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}_windows_amd64.zip
|
||||||
CHECKSUM_NAME: lingma-ipc-proxy_${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}_sha256.txt
|
CHECKSUM_NAME: lingma-ipc-proxy_${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}_sha256.txt
|
||||||
steps:
|
steps:
|
||||||
@@ -55,12 +56,19 @@ jobs:
|
|||||||
- name: Prepare release assets
|
- name: Prepare release assets
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
|
Copy-Item .\dist\lingma-ipc-proxy.exe .\$env:EXE_NAME -Force
|
||||||
|
|
||||||
|
$exePath = Join-Path $PWD $env:EXE_NAME
|
||||||
$archivePath = Join-Path $PWD $env:ARCHIVE_NAME
|
$archivePath = Join-Path $PWD $env:ARCHIVE_NAME
|
||||||
$checksumPath = Join-Path $PWD $env:CHECKSUM_NAME
|
$checksumPath = Join-Path $PWD $env:CHECKSUM_NAME
|
||||||
Compress-Archive -Path .\dist\lingma-ipc-proxy.exe -DestinationPath $archivePath -Force
|
Compress-Archive -Path $exePath -DestinationPath $archivePath -Force
|
||||||
|
|
||||||
$hash = (Get-FileHash -Algorithm SHA256 $archivePath).Hash.ToLowerInvariant()
|
$exeHash = (Get-FileHash -Algorithm SHA256 $exePath).Hash.ToLowerInvariant()
|
||||||
"$hash $($env:ARCHIVE_NAME)" | Set-Content -NoNewline $checksumPath
|
$zipHash = (Get-FileHash -Algorithm SHA256 $archivePath).Hash.ToLowerInvariant()
|
||||||
|
@(
|
||||||
|
"$exeHash $($env:EXE_NAME)"
|
||||||
|
"$zipHash $($env:ARCHIVE_NAME)"
|
||||||
|
) | Set-Content $checksumPath
|
||||||
|
|
||||||
- name: Create or update release
|
- name: Create or update release
|
||||||
uses: softprops/action-gh-release@v2
|
uses: softprops/action-gh-release@v2
|
||||||
@@ -68,5 +76,6 @@ jobs:
|
|||||||
tag_name: ${{ env.RELEASE_TAG }}
|
tag_name: ${{ env.RELEASE_TAG }}
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
files: |
|
files: |
|
||||||
|
${{ env.EXE_NAME }}
|
||||||
${{ env.ARCHIVE_NAME }}
|
${{ env.ARCHIVE_NAME }}
|
||||||
${{ env.CHECKSUM_NAME }}
|
${{ env.CHECKSUM_NAME }}
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ git push origin v0.1.0
|
|||||||
|
|
||||||
Release assets:
|
Release assets:
|
||||||
|
|
||||||
|
- `lingma-ipc-proxy_<tag>_windows_amd64.exe`
|
||||||
- `lingma-ipc-proxy_<tag>_windows_amd64.zip`
|
- `lingma-ipc-proxy_<tag>_windows_amd64.zip`
|
||||||
- `lingma-ipc-proxy_<tag>_sha256.txt`
|
- `lingma-ipc-proxy_<tag>_sha256.txt`
|
||||||
|
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ git push origin v0.1.0
|
|||||||
|
|
||||||
发布产物:
|
发布产物:
|
||||||
|
|
||||||
|
- `lingma-ipc-proxy_<tag>_windows_amd64.exe`
|
||||||
- `lingma-ipc-proxy_<tag>_windows_amd64.zip`
|
- `lingma-ipc-proxy_<tag>_windows_amd64.zip`
|
||||||
- `lingma-ipc-proxy_<tag>_sha256.txt`
|
- `lingma-ipc-proxy_<tag>_sha256.txt`
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user