Skip to content

Commit

Permalink
info ci
Browse files Browse the repository at this point in the history
  • Loading branch information
pepone committed Feb 14, 2024
1 parent fd45c72 commit 6dcc1a7
Showing 1 changed file with 77 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/info.yml
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

0 comments on commit 6dcc1a7

Please sign in to comment.