Skip to content
This repository was archived by the owner on Mar 2, 2026. It is now read-only.

Commit 5093127

Browse files
committed
Add build workflow
1 parent 9bf1dcf commit 5093127

1 file changed

Lines changed: 62 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: build
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- master
8+
paths-ignore:
9+
- '*.md'
10+
pull_request:
11+
paths-ignore:
12+
- '*.md'
13+
14+
jobs:
15+
16+
build:
17+
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
22+
runs-on: windows-latest
23+
24+
env:
25+
Solution_Path: AnyBar.Localization.slnx
26+
Project_Path: AnyBar.Localization\AnyBar.Localization.csproj
27+
28+
steps:
29+
30+
# Checkout codes
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
# Install the .NET Core workload
35+
- name: Setup .NET
36+
uses: actions/setup-dotnet@v4
37+
with:
38+
dotnet-version: |
39+
7.0.x
40+
41+
# Restore dependencies
42+
- name: Restore dependencies
43+
run: dotnet restore ${{ env.Solution_Path }}
44+
45+
# Build the project
46+
- name: Build
47+
run: dotnet build ${{ env.Solution_Path }} --configuration Release --no-restore
48+
49+
# Execute all unit tests in the solution
50+
- name: Execute unit tests
51+
run: dotnet test ${{ env.Solution_Path }} --configuration Release --no-build
52+
53+
# Pack the NuGet package
54+
- name: Create NuGet package
55+
run: dotnet pack ${{ env.Project_Path }} --configuration Release --no-build --output nupkgs
56+
57+
# Upload the NuGet package
58+
- name: Upload NuGet package
59+
uses: actions/upload-artifact@v4
60+
with:
61+
name: AnyBar.Localization
62+
path: AnyBar.Localization/bin/Release

0 commit comments

Comments
 (0)