Skip to content

Commit bfc34f0

Browse files
committed
fix: github action errors
1 parent 4f6ff58 commit bfc34f0

1 file changed

Lines changed: 10 additions & 15 deletions

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
shell: pwsh
5252
run: |
5353
$installer_path = "C:/app/build/ChemLocalLink-${{ github.event.inputs.version }}.exe"
54-
$installer_name = "ChemLocalLink-Setup-${{ github.event.inputs.version }}.exe"
54+
$installer_name = "ChemLocalLinkSetup_${{ github.event.inputs.version }}.exe"
5555
echo "path=$installer_path" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
5656
echo "name=$installer_name" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
5757
@@ -91,6 +91,8 @@ jobs:
9191
runs-on: ubuntu-latest
9292
needs: [build-windows, build-linux]
9393
steps:
94+
- name: Checkout code
95+
uses: actions/checkout@v4
9496
- name: Create GitHub Release
9597
id: create_release
9698
uses: actions/create-release@v1
@@ -115,23 +117,16 @@ jobs:
115117
with:
116118
name: debian-packages
117119
path: /tmp/debian-packages
120+
- name: Prepare Windows asset rename
121+
run: |
122+
mv /tmp/windows-installer/ChemLocalLink-${{ github.event.inputs.version }}.exe /tmp/windows-installer/${{ needs.build-windows.outputs.installer_name }}
118123
119-
- name: Upload Windows Release Asset
120-
uses: actions/upload-release-asset@v1
121-
env:
122-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123-
with:
124-
upload_url: ${{ steps.create_release.outputs.upload_url }}
125-
asset_path: /tmp/windows-installer/ChemLocalLink-${{ github.event.inputs.version }}.exe
126-
asset_name: ${{ needs.build-windows.outputs.installer_name }}
127-
asset_content_type: application/octet-stream
128-
129-
- name: Upload Debian Release Asset
130-
id: upload-debs
124+
- name: Upload Release Assets (Windows + Debian)
131125
run: |
126+
version=${{ github.event.inputs.version }}
127+
gh release upload "v${version}" /tmp/windows-installer/${{ needs.build-windows.outputs.installer_name }} --clobber
132128
for file in /tmp/debian-packages/*.deb; do
133-
asset_name=$(basename "$file")
134-
gh release upload v${{ github.event.inputs.version }} "$file" --clobber
129+
gh release upload "v${version}" "$file" --clobber
135130
done
136131
env:
137132
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)