Skip to content

Commit

Permalink
feat(ci): Implement GH Actions workflow, disable DOTNET telemetry in …
Browse files Browse the repository at this point in the history
…batch file
  • Loading branch information
tuxuser committed Jul 27, 2024
1 parent 4b3ffaf commit 4cff5c0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build

on:
push:
pull_request:

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x

- name: Restore dependencies
run: dotnet restore

- name: Build just SharpShell
working-directory: ./SharpShell
run: dotnet publish -c Release /p:PublishProfile=DeployPublish --no-restore

- name: Generate dependency
run: python generate_embedded.py

- name: Build
working-directory: ./SharpShell.Loader
run: dotnet build -c Debug /p:RunAnalyzers=false --no-restore

- name: Package
run: |
mkdir release\pwsh
xcopy README.md release\
xcopy pwsh.bat release\
xcopy run_pwsh.xml release\pwsh\
xcopy SharpShell.Loader\bin\Debug\net6.0\SharpShell.Loader.dll release\pwsh\
7z a -tzip SharpShell.zip .\release\*
- name: Upload artifacts (dotnet)
uses: actions/upload-artifact@v4
with:
name: SharpShell
path: .\release\*

- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: SharpShell.zip
2 changes: 1 addition & 1 deletion pwsh.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off

set DOTNET_CLI_ANALYTICS_OUTPUT=1
set DOTNET_CLI_TELEMETRY_OPTOUT=1
cd pwsh
..\dotnet\dotnet.exe msbuild .\run_pwsh.xml

0 comments on commit 4cff5c0

Please sign in to comment.