-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (30 loc) · 1.45 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-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
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Publish
run: |
mkdir publish
dotnet publish --no-restore -c Release -o ./publish/windows -r win10-x64 --self-contained /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishReadyToRun=false /p:PublishTrimmed=false src/MarkdownLocalize.CLI
dotnet publish --no-restore -c Release -o ./publish/osx -r osx.10.11-x64 --self-contained /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishReadyToRun=false /p:PublishTrimmed=false src/MarkdownLocalize.CLI
dotnet publish --no-restore -c Release -o ./publish/linux -r linux-x64 --self-contained /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishReadyToRun=false /p:PublishTrimmed=false src/MarkdownLocalize.CLI
mv publish/windows/MarkdownLocalize.CLI.exe publish/md-localize-windows.exe
mv publish/osx/MarkdownLocalize.CLI publish/md-localize-osx
mv publish/linux/MarkdownLocalize.CLI publish/md-localize-linux