File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Package
2+
3+ on :
4+ workflow_dispatch :
5+ push :
6+ tags :
7+ - ' v*'
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ timeout-minutes : 30
13+ env :
14+ GITHUB_ACTIONS : true
15+ PUBLISH_DIR : bin/Release/net8.0/win-x64/publish
16+ OUTPUT_ZIP : output/convertApi-cli.zip
17+
18+ steps :
19+ # Checkout the code
20+ - name : Checkout
21+ uses : actions/checkout@v4
22+
23+ # Setup .NET SDK
24+ - name : Setup .NET SDK
25+ uses : actions/setup-dotnet@v4
26+ with :
27+ dotnet-version : ' 8.x'
28+
29+ # Run tests
30+ - name : Test
31+ run : dotnet test ConvertApi.Cli.Tests
32+
33+ # Build the project
34+ - name : Build
35+ run : dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true
36+
37+ # Create a zip package
38+ - name : Create ZIP package
39+ run : |
40+ mkdir -p output
41+ zip -j ${{ env.OUTPUT_ZIP }} ${{ env.PUBLISH_DIR }}/*
42+
43+ # Upload the artifact
44+ - name : Upload artifact
45+ uses : actions/upload-artifact@v3
46+ with :
47+ name : convertApi-cli
48+ path : ${{ env.OUTPUT_ZIP }}
You can’t perform that action at this time.
0 commit comments