Skip to content

dep: Update dependency QRCoder.Xaml to v1.5.0 #1121

dep: Update dependency QRCoder.Xaml to v1.5.0

dep: Update dependency QRCoder.Xaml to v1.5.0 #1121

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
env:
ProjectName: BilibiliLiveRecordDownLoader
NET_TFM: net8.0-windows10.0.22621.0
Configuration: Release
jobs:
build:
name: Build
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
runs-on: windows-latest
strategy:
matrix:
Rid: [generic, win-x64, win-x86, win-arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build ${{ matrix.Rid }}
shell: pwsh
run: .\build.ps1 ${{ matrix.Rid }}
- name: Upload ${{ matrix.Rid }}
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: ${{ env.ProjectName }}-${{ matrix.Rid }}
path: ${{ env.ProjectName }}\bin\${{ env.Configuration }}\${{ env.NET_TFM }}\${{ matrix.Rid }}\publish\
nuget:
name: Nuget
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
strategy:
matrix:
PackageName:
[
BilibiliLiveRecordDownLoader.Shared,
BilibiliLiveRecordDownLoader.BilibiliApi,
]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
shell: pwsh
run: dotnet build -c Release ${{ matrix.PackageName }}\${{ matrix.PackageName }}.csproj
- name: Push nuget packages
shell: pwsh
run: |
dotnet nuget push ${{ matrix.PackageName }}\bin\Release\*.nupkg -s https://nuget.pkg.github.com/HMBSbige -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
dotnet nuget push ${{ matrix.PackageName }}\bin\Release\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NuGetAPIKey }} --skip-duplicate
release:
name: Release
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
shell: pwsh
run: .\build.ps1
- name: Package generic
shell: pwsh
run: |
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
$zip_path = "C:\builtfiles\$env:ProjectName-generic-${{ github.ref_name }}.7z"
7z a -mx9 "$zip_path" ".\$env:ProjectName\bin\$env:Configuration\$env:NET_TFM\generic\publish\"
7z rn "$zip_path" publish $env:ProjectName
echo "GENERIC_SHA256=$((Get-FileHash $zip_path -Algorithm SHA256).Hash)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Package win-x64
shell: pwsh
run: |
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
$zip_path = "C:\builtfiles\$env:ProjectName-win-x64-${{ github.ref_name }}.7z"
7z a -mx9 "$zip_path" ".\$env:ProjectName\bin\$env:Configuration\$env:NET_TFM\win-x64\publish\"
7z rn "$zip_path" publish $env:ProjectName
echo "WINX64_SHA256=$((Get-FileHash $zip_path -Algorithm SHA256).Hash)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Package win-arm64
shell: pwsh
run: |
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
$zip_path = "C:\builtfiles\$env:ProjectName-win-arm64-${{ github.ref_name }}.7z"
7z a -mx9 "$zip_path" ".\$env:ProjectName\bin\$env:Configuration\$env:NET_TFM\win-arm64\publish\"
7z rn "$zip_path" publish $env:ProjectName
echo "WINARM64_SHA256=$((Get-FileHash $zip_path -Algorithm SHA256).Hash)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Package win-x86
shell: pwsh
run: |
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
$zip_path = "C:\builtfiles\$env:ProjectName-win-x86-${{ github.ref_name }}.7z"
7z a -mx9 "$zip_path" ".\$env:ProjectName\bin\$env:Configuration\$env:NET_TFM\win-x86\publish\"
7z rn "$zip_path" publish $env:ProjectName
echo "WINX86_SHA256=$((Get-FileHash $zip_path -Algorithm SHA256).Hash)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Create a new GitHub release if a new tag is pushed
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: v${{ github.ref_name }}
prerelease: true
draft: false
artifacts: C:\builtfiles\*
body: |
## 更新日志:
* 这是 GitHub Actions 自动化部署,更新日志应该很快会手动更新
## 文件校验
| 文件名 | SHA256 |
| :- | :- |
| <sub>${{ env.ProjectName }}-generic-${{ github.ref_name }}.7z</sub> | <sub>${{ env.GENERIC_SHA256 }}</sub> |
| <sub>${{ env.ProjectName }}-win-x64-${{ github.ref_name }}.7z</sub> | <sub>${{ env.WINX64_SHA256 }}</sub> |
| <sub>${{ env.ProjectName }}-win-arm64-${{ github.ref_name }}.7z</sub> | <sub>${{ env.WINARM64_SHA256 }}</sub> |
| <sub>${{ env.ProjectName }}-win-x86-${{ github.ref_name }}.7z</sub> | <sub>${{ env.WINX86_SHA256 }}</sub> |