v2.0.0-preview.3 #10
Workflow file for this run
This file contains hidden or 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
| name: prerelease | |
| on: | |
| release: | |
| branches: [main, devel, release/*] | |
| types: | |
| - prereleased | |
| jobs: | |
| publish: | |
| name: Pre-release on ${{ matrix.os }} | |
| environment: Pre-release | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: true | |
| - name: Setup .NET 10.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Setup .NET 9.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Build | |
| run: | | |
| dotnet nuget locals all --clear | |
| dotnet restore templates | |
| dotnet build -p:Version=${GITHUB_REF#refs/tags/v} -c Release src/rclnet.sln | |
| dotnet build -p:Version=${GITHUB_REF#refs/tags/v} -c Release src/ros2cs.sln | |
| - name: Update Template Package Reference | |
| working-directory: templates/templates | |
| run: sed -i -E "s/(Version=\").+(\")/\1${GITHUB_REF#refs/tags/v}\2/" ros2-msg/Company.MessageLibrary1.csproj ros2-node/Company.Node1.csproj | |
| - name: Pack | |
| run: | | |
| dotnet pack -p:Version=${GITHUB_REF#refs/tags/v} -c Release --no-build -o bin/ src/Rosidl.Runtime | |
| dotnet pack -p:Version=${GITHUB_REF#refs/tags/v} -c Release --no-build -o bin/ src/Rcl.NET | |
| dotnet pack -p:Version=${GITHUB_REF#refs/tags/v} -c Release --no-build -o bin/ src/ros2cs | |
| - name: Publish NugGet Package | |
| working-directory: bin | |
| run: | | |
| dotnet nuget push *.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate |