mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Create Pre Build CI.yml
This commit is contained in:
57
.github/workflows/Pre Build CI.yml
vendored
Normal file
57
.github/workflows/Pre Build CI.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
name: Pre Build CI
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: NuGet
|
||||
uses: nuget/setup-nuget@v1
|
||||
|
||||
- name: MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Update submodules
|
||||
uses: snickerbockers/submodules-init@v4
|
||||
|
||||
- name: Restore NuGet Package
|
||||
run: nuget restore Netch.sln
|
||||
|
||||
- name: Build .NET 4.8
|
||||
shell: pwsh
|
||||
run: |
|
||||
.\BUILD.ps1
|
||||
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
|
||||
Compress-Archive -Path Netch\bin\x64\Release\win-x64\* -DestinationPath C:\builtfiles\Netch.zip
|
||||
echo "::set-env name=Netch_SHA256::$(.\GetSHA256.ps1 C:\builtfiles\Netch.zip)"
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Netch
|
||||
path: Netch\bin\x64\Release\win-x64
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
with:
|
||||
tag_name: Pre-${{github.run_number}}
|
||||
name: Pre Release - ${{github.run_number}}
|
||||
prerelease: true
|
||||
draft: false
|
||||
files: |
|
||||
C:\builtfiles\Netch.zip
|
||||
body: |
|
||||
[](https://t.me/Netch) [](https://t.me/Netch_Discuss_Group)
|
||||
|
||||
${{ github.event.head_commit.message }}
|
||||
|
||||
## 校验和
|
||||
| 文件名 | SHA256 |
|
||||
| :- | :- |
|
||||
| Netch.zip | ${{ env.Netch_SHA256 }} |
|
||||
Reference in New Issue
Block a user