Skip to content

Commit

Permalink
4
Browse files Browse the repository at this point in the history
  • Loading branch information
OldGodShen committed Jun 4, 2024
1 parent e05b56c commit 9e6fae7
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/tauri.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,48 @@ jobs:
- name: Verify bun installation
run: bun --version

- name: Install dependencies
run: bun install

- name: Build
run: |
bun i
bun tauri build --verbose
- name: Extract version from package.json
id: extract_version
run: |
$packageJson = Get-Content -Raw -Path package.json | ConvertFrom-Json
$version = $packageJson.version
echo "VERSION=$version" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
shell: pwsh

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release v${{ env.VERSION }}
draft: false
prerelease: false

- name: Upload MSI Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: D:\a\xyyInfoQuery\xyyInfoQuery\src-tauri\target\x86_64-pc-windows-msvc\release\bundle\msi\xyyinfoquery_${{ env.VERSION }}_x64_en-US.msi
asset_name: xyyinfoquery_${{ env.VERSION }}_x64_en-US.msi
asset_content_type: application/octet-stream

- name: Upload EXE Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: D:\a\xyyInfoQuery\xyyInfoQuery\src-tauri\target\x86_64-pc-windows-msvc\release\bundle\nsis\xyyinfoquery_${{ env.VERSION }}_x64-setup.exe
asset_name: xyyinfoquery_${{ env.VERSION }}_x64-setup.exe
asset_content_type: application/octet-stream

0 comments on commit 9e6fae7

Please sign in to comment.