延迟显示现在翻倍,因为以前显示的都是单向延迟,不怎么符合大家的直觉,现在40左右是比较舒服的延迟,60以上基本就比较卡了,20以内则是流畅。 #6
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 Deploy | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'HostUtilities/**' | |
# workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-2019 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v1 | |
- name: Copy Project File | |
run: | | |
copy HostUtilities.csproj HostUtilities/HostUtilities/ | |
- name: Build DotNET35 | |
run: | | |
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin\" | |
.\MSBuild.exe $Env:GITHUB_WORKSPACE\HostUtilities\HostUtilities\HostUtilities.csproj | |
- name: Compress Files | |
run: | | |
cd $Env:GITHUB_WORKSPACE | |
git clone https://github.com/CH3NGYZ/Overcooked-2-HostUtilities-ResourceFiles.git | |
mkdir -p CHA\Audio | |
Copy-Item -Path "HostUtilities\HostUtilities\bin\Release\HostUtilities.dll" -Destination Overcooked-2-HostUtilities-ResourceFiles -Force | |
Copy-Item -Path "Overcooked-2-HostUtilities-ResourceFiles\*" -Destination CHA -Force | |
Copy-Item -Path "Overcooked-2-HostUtilities-ResourceFiles\Audio\*" -Destination CHA\Audio -Force | |
Compress-Archive -Path "$Env:GITHUB_WORKSPACE\CHA" -DestinationPath "$Env:GITHUB_WORKSPACE\CHA.zip" | |
- name: Show CHA Folder | |
run: | | |
ls $Env:GITHUB_WORKSPACE\CHA | |
- name: Show CHA Audio Folder | |
run: | | |
ls $Env:GITHUB_WORKSPACE\CHA\Audio | |
- name: Get latest tag | |
id: get_tag | |
run: | | |
$latestTag = Invoke-RestMethod -Uri "https://api.github.com/repos/${env:GITHUB_REPOSITORY}/releases/latest" -Headers @{"Authorization"="Bearer ${{ secrets.GH_TOKEN }}"} | |
$latestTag = $latestTag.tag_name | |
echo "::set-output name=tag::$latestTag" | |
echo "$latestTag" | |
- name: Extract version number | |
id: extract_version | |
run: | | |
$version = "${{ steps.get_tag.outputs.tag }}" -replace 'v1.0.', '' | |
echo "::set-output name=version::$version" | |
echo "$version" | |
- name: Calculate new version | |
id: calculate_version | |
run: | | |
echo "::set-output name=new_version::1.0.$((${{ steps.extract_version.outputs.version }} + 1))" | |
echo "1.0.$((${{ steps.extract_version.outputs.version }} + 1))" | |
- name: Get UTC+8 Date | |
id: get_utc8_date | |
run: | | |
$dateUtc8 = (Get-Date).AddHours(8).ToString("yyyy-MM-dd HH:mm:ss") | |
echo "::set-output name=date_utc8::$dateUtc8" | |
- name: show params | |
id: show_param | |
run: | | |
echo "tag_name: v${{ steps.calculate_version.outputs.new_version }}" | |
echo "name: v${{ steps.calculate_version.outputs.new_version }}" | |
echo "body: |" | |
"v${{ steps.calculate_version.outputs.new_version }} ${{ steps.get_utc8_date.outputs.date_utc8 }}" | |
"${{ github.event.head_commit.message }}" | |
- name: Create Release | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: CHA.zip | |
tag_name: v${{ steps.calculate_version.outputs.new_version }} | |
name: v${{ steps.calculate_version.outputs.new_version }} | |
body: | | |
v${{ steps.calculate_version.outputs.new_version }} ${{ steps.get_utc8_date.outputs.date_utc8 }} | |
${{ github.event.head_commit.message }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |