forked from icerpc/icerpc-csharp
-
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
77 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,77 @@ | ||
name: info | ||
|
||
on: | ||
push: | ||
branches: ["main", "0.2.x"] | ||
|
||
jobs: | ||
build-packages: | ||
runs-on: ubuntu-22.04 | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set version from tag | ||
run: echo "VERSION=$($env:GITHUB_REF.TrimStart('refs/tags/v'))" >> $env:GITHUB_ENV | ||
- name: Pack IceRPC Tools | ||
working-directory: tools | ||
run: | | ||
dotnet build --configuration Release | ||
dotnet pack --configuration Release --output ../ | ||
env: | ||
SLICEC_CS_STAGING_PATH: ${{ github.workspace }}\tools\slicec-cs\staging | ||
- name: Pack IceRPC | ||
run: dotnet pack --configuration Release --output . | ||
- name: Pack IceRPC Templates | ||
working-directory: src/IceRpc.Templates | ||
run: dotnet pack --configuration Release --output ../../ | ||
- name: Upload packages | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: packages | ||
path: | | ||
./*.nupkg | ||
./*.snupkg | ||
test-packages: | ||
timeout-minutes: 10 | ||
strategy: | ||
matrix: | ||
include: | ||
- os: ubuntu-22.04 | ||
runs-on: ${{ matrix.os }} | ||
needs: build-packages | ||
steps: | ||
- name: Download packages artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: packages | ||
path: packages | ||
- name: Install packages to local NuGet repository | ||
working-directory: packages | ||
run: | | ||
mkdir -p ~/.nuget/packages | ||
dotnet nuget push *.nupkg --source ~/.nuget/packages | ||
if: runner.os == 'macOS' || runner.os == 'Linux' | ||
shell: bash | ||
- name: Install packages to local NuGet repository | ||
working-directory: packages | ||
run: | | ||
New-Item -ItemType Directory -Path $env:USERPROFILE/.nuget/packages | ||
dotnet nuget push *.nupkg --source $env:USERPROFILE/.nuget/packages | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
- name: Set version from tag | ||
run: echo "VERSION=$($env:GITHUB_REF.TrimStart('refs/tags/v'))" >> $env:GITHUB_ENV | ||
- name: 🔨 Build Examples | ||
run: | | ||
pwd | ||
ls -l | ||
for solution in examples/*/*/*.sln; do dotnet build "$solution"; done | ||
if: runner.os == 'macOS' || runner.os == 'Linux' | ||
shell: bash | ||
- name: 🔨 Build Examples | ||
run: | | ||
$examples = Get-ChildItem -Path examples -Recurse -Include *.sln | ||
foreach ($example in $examples) { dotnet build $example.FullName } | ||
if: runner.os == 'Windows' | ||
shell: powershell | ||
|