mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
Update build scripts
This commit is contained in:
55
.github/workflows/build.yml
vendored
55
.github/workflows/build.yml
vendored
@@ -1,44 +1,44 @@
|
||||
name: GitHub Actions & Netch CI
|
||||
|
||||
name: Netch CI
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: Get tag name
|
||||
uses: olegtarasov/get-tag@v1
|
||||
steps:
|
||||
- name: NuGet
|
||||
uses: nuget/setup-nuget@v1
|
||||
|
||||
- name: submodules-init
|
||||
uses: snickerbockers/submodules-init@v4
|
||||
|
||||
- uses: nuget/setup-nuget@v1
|
||||
- run: nuget restore Netch.sln
|
||||
|
||||
- name: Setup MSBuild.exe
|
||||
- name: MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.0
|
||||
|
||||
- name: Build .NET 4.8 Netch
|
||||
- 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
|
||||
.\BUILD.ps1
|
||||
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
|
||||
Compress-Archive -Path Netch\bin\x64\Release\win-x64\* -DestinationPath C:\builtfiles\Netch-${{ env.GITHUB_TAG_NAME }}.zip
|
||||
echo "::set-env name=Netch_SHA256::$(.\getSHA256.ps1 C:\builtfiles\Netch-${{ env.GITHUB_TAG_NAME }}.zip)"
|
||||
echo "::set-env name=Netch_SHA256::$(.\GetSHA256.ps1 C:\builtfiles\Netch-${{ env.GITHUB_TAG_NAME }}.zip)"
|
||||
|
||||
- name: Upload Netch
|
||||
- name: Upload
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: Netch
|
||||
path: Netch\bin\x64\Release\win-x64
|
||||
|
||||
# Create a new release: create a tag, then 'git push origin <tagname>', wait for it to build
|
||||
- name: Create a new GitHub release if a new tag is pushed
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
name: ${{ env.GITHUB_TAG_NAME }}
|
||||
prerelease: true
|
||||
@@ -50,12 +50,9 @@ jobs:
|
||||
[](https://t.me/Netch) [](https://t.me/Netch_Discuss_Group)
|
||||
|
||||
## 更新日志:
|
||||
* 这是 GitHub Action 自动化部署,更新日志应该很快会手动更新:D
|
||||
* 这是 GitHub Action 自动化部署,更新日志应该很快会手动更新
|
||||
|
||||
## 文件校验
|
||||
## 校验和
|
||||
| 文件名 | SHA256 |
|
||||
| :- | :- |
|
||||
| <sub>Netch-${{ env.GITHUB_TAG_NAME }}.zip</sub> | <sub>${{ env.Netch_SHA256 }}</sub> |
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
env:
|
||||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
||||
| Netch-${{ env.GITHUB_TAG_NAME }}.zip | ${{ env.Netch_SHA256 }} |
|
||||
|
||||
Reference in New Issue
Block a user