bugfix:修复zip文件不能安装的bug #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and release tag | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: Install Dependencies | |
run: npm install | |
- name: Build Release Files | |
run: npm run build | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Zip the build | |
run: powershell -Command "Compress-Archive -Path .\release\win-unpacked\* -DestinationPath .\l4d2addon_installer_${{ github.ref_name }}_windows.zip" | |
- name: Install GitHub CLI | |
run: | | |
Invoke-WebRequest -Uri https://github.com/cli/cli/releases/download/v2.0.0/gh_2.0.0_windows_amd64.msi -OutFile gh.msi | |
Start-Process msiexec.exe -Wait -ArgumentList '/I gh.msi /quiet' | |
- name: Create Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release create ${{ github.ref }} l4d2addon_installer_${{ github.ref_name }}_windows.zip --title "${{ github.ref_name }}" --notes "TODO New Release." |