add package license expression for nuget #53
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: Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| path: ${{ github.event.repository.name }} | |
| - name: Checkout `data` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/data | |
| token: ${{ secrets.PAT }} | |
| path: data | |
| - name: Checkout `shaders` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/shaders | |
| token: ${{ secrets.PAT }} | |
| path: shaders | |
| - name: Checkout `collections` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/collections | |
| token: ${{ secrets.PAT }} | |
| path: collections | |
| - name: Checkout `simulation` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/simulation | |
| token: ${{ secrets.PAT }} | |
| path: simulation | |
| - name: Checkout `unmanaged` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/unmanaged | |
| token: ${{ secrets.PAT }} | |
| path: unmanaged | |
| - name: Checkout `worlds` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/worlds | |
| token: ${{ secrets.PAT }} | |
| path: worlds | |
| - name: Checkout `types` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/types | |
| token: ${{ secrets.PAT }} | |
| path: types | |
| - name: Checkout `data-systems` | |
| uses: actions/checkout@v4.1.2 | |
| with: | |
| repository: simulation-tree/data-systems | |
| token: ${{ secrets.PAT }} | |
| path: data-systems | |
| - name: Setup | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| - name: Set VERSION variable from tag | |
| run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV | |
| - name: Build `Shaders.Systems` | |
| run: dotnet build "${{ github.event.repository.name }}/source" -c Debug /p:Version=${VERSION} | |
| - name: Build `Shaders.Systems` | |
| run: dotnet build "${{ github.event.repository.name }}/source" -c Release /p:Version=${VERSION} | |
| - name: Build `Shaders.Systems.Tests` | |
| run: dotnet build "${{ github.event.repository.name }}/tests" -c Debug /p:Version=${VERSION} | |
| - name: Build `Shaders.Systems.Tests` | |
| run: dotnet build "${{ github.event.repository.name }}/tests" -c Release /p:Version=${VERSION} | |
| - name: Test | |
| run: dotnet test "${{ github.event.repository.name }}/tests" -c Release --logger "trx" | |
| - name: Pack `Shaders.Systems` | |
| run: dotnet pack "${{ github.event.repository.name }}/source" /p:Version=${VERSION} --no-build --output . | |
| - name: Add NuGet Source | |
| run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text | |
| - name: Publish `Shaders.Systems` | |
| run: dotnet nuget push SimulationTree.Shaders.Systems.${VERSION}.nupkg --source github --api-key ${NUGET_TOKEN} | |
| env: | |
| NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} |