-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: CI | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
project: | ||
- Riverside.Markup | ||
- Riverside.Markup.CompilerServices | ||
- Riverside.Markup.Controls | ||
- Riverside.Markup.InteropServices | ||
# Add more projects here as needed | ||
|
||
outputs: | ||
normalized_name: ${{ steps.normalize_name.outputs.normalized_name }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: '8.x' | ||
|
||
- name: Restore dependencies | ||
run: dotnet restore src/${{ matrix.project }}/${{ matrix.project }}.csproj | ||
|
||
- name: Build project | ||
run: dotnet build src/${{ matrix.project }}/${{ matrix.project }}.csproj --configuration Release --no-restore | ||
|
||
- name: Pack project | ||
run: dotnet pack src/${{ matrix.project }}/${{ matrix.project }}.csproj --configuration Release --no-build -o ./output | ||
|
||
- name: Normalize project name | ||
id: normalize_name | ||
run: echo "normalized_name=$(echo src/${{ matrix.project }}/${{ matrix.project }} | tr '/' '-')" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: Packages | ||
path: ./output/*.nupkg | ||
|