mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
m
This commit is contained in:
49
.github/workflows/build.yml
vendored
Normal file
49
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,49 @@
|
||||
name: Netch CI
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
NetchDataURL: https://github.com/NetchX/NetchData/archive/refs/heads/master.zip
|
||||
NetchModeURL: https://github.com/NetchX/NetchMode/archive/refs/heads/master.zip
|
||||
NetchI18NURL: https://github.com/NetchX/NetchTranslation/archive/refs/heads/master.zip
|
||||
steps:
|
||||
- name: MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Submodule
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Name release
|
||||
Set-Location release
|
||||
|
||||
Invoke-WebRequest -Uri $NetchDataURL -OutFile data.zip
|
||||
Invoke-WebRequest -Uri $NetchModeURL -OutFile mode.zip
|
||||
Invoke-WebRequest -Uri $NetchI18NURL -OutFile i18n.zip
|
||||
|
||||
Expand-Archive -Force -Path data.zip -DestinationPath bin
|
||||
Expand-Archive -Force -Path mode.zip -DestinationPath .
|
||||
Expand-Archive -Force -Path i18n.zip -DestinationPath .
|
||||
|
||||
Remove-Item -Force README.md
|
||||
Remove-Item -Force data.zip
|
||||
Remove-Item -Force mode.zip
|
||||
Remove-Item -Force i18n.zip
|
||||
|
||||
- name: Build
|
||||
shell: pwsh
|
||||
run: .\build.ps1 Release -o release
|
||||
|
||||
- name: Upload
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Netch
|
||||
path: release
|
||||
37
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@@ -1,37 +0,0 @@
|
||||
name: Netch CI
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
dependabot/**
|
||||
pull_request:
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
OutputPath: Netch\bin\Publish\Debug
|
||||
steps:
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Binaries Repo LFS Pull
|
||||
working-directory: binaries
|
||||
run: git lfs pull
|
||||
|
||||
- name: Build Solution
|
||||
shell: pwsh
|
||||
run: .\BUILD.ps1 Release -o ${{ env.OutputPath }}
|
||||
|
||||
- name: Upload Artifact
|
||||
continue-on-error: true
|
||||
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Netch
|
||||
path: ${{ env.OutputPath }}
|
||||
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: Netch Release
|
||||
name: Netch CI
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
@@ -8,20 +8,15 @@ jobs:
|
||||
name: Build
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Setup MSBuild
|
||||
- name: MSBuild
|
||||
uses: microsoft/setup-msbuild@v1.0.2
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
submodules: true
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Binaries Repo LFS Pull
|
||||
working-directory: binaries
|
||||
run: git lfs pull
|
||||
|
||||
- name: Build Solution
|
||||
- name: Build
|
||||
shell: pwsh
|
||||
run: .\BUILD.ps1
|
||||
|
||||
@@ -31,8 +26,8 @@ jobs:
|
||||
New-Item -ItemType Directory -Path C:\builtfiles -Force > $null
|
||||
7z a -mx9 C:\builtfiles\Netch.7z .\Netch\bin\Publish\
|
||||
7z rn C:\builtfiles\Netch.7z Publish Netch
|
||||
echo "Netch_SHA256=$(.\GetSHA256.ps1 C:\builtfiles\Netch.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "Netch_EXE_SHA256=$(.\GetSHA256.ps1 Netch\bin\Publish\Netch.exe)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "Netch_SHA256=$(.\sha256.ps1 C:\builtfiles\Netch.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
echo "Netch_EXE_SHA256=$(.\sha256.ps1 Netch\bin\Publish\Netch.exe)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
|
||||
Reference in New Issue
Block a user