diff --git a/.github/workflows/Nuget.yml b/.github/workflows/Nuget.yml index 13782a473..b11282c18 100644 --- a/.github/workflows/Nuget.yml +++ b/.github/workflows/Nuget.yml @@ -9,6 +9,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read + id-token: write steps: - name: Setup .NET 10 uses: actions/setup-dotnet@v5 @@ -45,38 +46,48 @@ jobs: # Four numbers: the version without its prerelease or build suffix, and a zero. echo "file_version=${version%%[-+]*}.0" >> $GITHUB_OUTPUT - - name: 'Pack and publish AngouriMath' + - name: 'Pack AngouriMath' run: | cd Sources/AngouriMath dotnet restore AngouriMath.csproj dotnet build AngouriMath.csproj -c release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} dotnet pack AngouriMath.csproj -c release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} - cd bin/release - dotnet nuget push AngouriMath.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org - - - name: 'Pack and publish AngouriMath.FSharp' + + - name: 'Pack AngouriMath.FSharp' run: | cd Sources/Wrappers/AngouriMath.FSharp dotnet restore dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} - cd bin/Release - dotnet nuget push AngouriMath.FSharp.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org - - - name: 'Pack and publish AngouriMath.Interactive' + + - name: 'Pack AngouriMath.Interactive' run: | cd Sources/Wrappers/AngouriMath.Interactive dotnet restore dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} - cd bin/Release - dotnet nuget push AngouriMath.Interactive.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org - - - name: 'Pack and publish AngouriMath.Terminal' + + - name: 'Pack AngouriMath.Terminal' run: | cd Sources/Terminal/AngouriMath.Terminal dotnet restore dotnet build -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} dotnet pack -c Release -p:Version=${{ steps.version.outputs.version }} -p:FileVersion=${{ steps.version.outputs.file_version }} - cd bin/Release - dotnet nuget push AngouriMath.Terminal.${{ steps.version.outputs.version }}.nupkg --api-key ${{ secrets.NUGET_KEY }} --source nuget.org + + - name: 'NuGet login' + id: login + uses: NuGet/login@8d196754b4036150537f80ac539e15c2f1028841 # v1.2.0 + with: + user: Happypig375 + + - name: 'Publish AngouriMath' + run: dotnet nuget push Sources/AngouriMath/bin/release/AngouriMath.${{ steps.version.outputs.version }}.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source nuget.org + + - name: 'Publish AngouriMath.FSharp' + run: dotnet nuget push Sources/Wrappers/AngouriMath.FSharp/bin/Release/AngouriMath.FSharp.${{ steps.version.outputs.version }}.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source nuget.org + + - name: 'Publish AngouriMath.Interactive' + run: dotnet nuget push Sources/Wrappers/AngouriMath.Interactive/bin/Release/AngouriMath.Interactive.${{ steps.version.outputs.version }}.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source nuget.org + + - name: 'Publish AngouriMath.Terminal' + run: dotnet nuget push Sources/Terminal/AngouriMath.Terminal/bin/Release/AngouriMath.Terminal.${{ steps.version.outputs.version }}.nupkg --api-key "${{ steps.login.outputs.NUGET_API_KEY }}" --source nuget.org