diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ca8fba75..5e6ee2d6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,6 +6,12 @@ jobs: name: Build runs-on: windows-latest steps: + - name: Go + uses: actions/setup-go@v2 + + - name: C++ + uses: msys2/setup-msys2@v2 + - name: MSBuild uses: microsoft/setup-msbuild@v1.0.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 526bb20b..144f012c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,41 +9,47 @@ jobs: name: Build runs-on: windows-latest steps: - - name: MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + - name: Go + uses: actions/setup-go@v2 - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 1 + - name: C++ + uses: msys2/setup-msys2@v2 - - name: Build - shell: pwsh - run: | - .\build.ps1 -Configuration Release -OutputPath release + - name: MSBuild + uses: microsoft/setup-msbuild@v1.0.2 - - name: Package - shell: pwsh - run: | - 7z a -mx9 Netch.7z release - 7z rn Netch.7z release Netch - echo "NETCH_SHA256=$(.\sha256.ps1 Netch.7z)" | Out-File -Append -Encoding UTF8 -FilePath $Env:GITHUB_ENV + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 1 - - name: Release - uses: softprops/action-gh-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - prerelease: ${{ contains(github.ref, '-') }} - draft: false - files: | - Netch.7z - body: | - [![](https://img.shields.io/badge/Telegram-Channel-blue)](https://t.me/netch_channel) [![](https://img.shields.io/badge/Telegram-Group-green)](https://t.me/netch_group) - ## 更新日志 - * 这是 GitHub Actions 自动化部署,更新日志应该很快会手动更新 + - name: Build + shell: pwsh + run: | + .\build.ps1 -Configuration Release -OutputPath release - ## 校验和 - | 文件名 | SHA256 | - | :- | :- | - | Netch.7z | ${{ env.Netch_SHA256 }} | + - name: Package + shell: pwsh + run: | + 7z a -mx9 Netch.7z release + 7z rn Netch.7z release Netch + echo "NETCH_SHA256=$(.\sha256.ps1 Netch.7z)" | Out-File -Append -Encoding UTF8 -FilePath $Env:GITHUB_ENV + + - name: Release + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prerelease: ${{ contains(github.ref, '-') }} + draft: false + files: | + Netch.7z + body: | + [![](https://img.shields.io/badge/Telegram-Channel-blue)](https://t.me/netch_channel) [![](https://img.shields.io/badge/Telegram-Group-green)](https://t.me/netch_group) + ## 更新日志 + * 这是 GitHub Actions 自动化部署,更新日志应该很快会手动更新 + + ## 校验和 + | 文件名 | SHA256 | + | :- | :- | + | Netch.7z | ${{ env.Netch_SHA256 }} | diff --git a/Other/build.ps1 b/Other/build.ps1 index ecc223fa..c1a269c5 100644 --- a/Other/build.ps1 +++ b/Other/build.ps1 @@ -5,9 +5,6 @@ Set-Location $exec .\clean.ps1 -gcc -v -go version - Get-ChildItem -Path . -Directory | ForEach-Object { $name=$_.Name