diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index df9e5df..0195244 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,6 +12,9 @@ env: jobs: release: name: release + permissions: + contents: read + id-token: write # for OIDC token runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,6 +23,12 @@ jobs: with: dotnet-version: ${{ env.DOTNET_VERSION }} + - name: NuGet Login + uses: NuGet/login@v1 + id: login + with: + user: nenoNaninu + - name: Get version from git tag run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV @@ -41,4 +50,4 @@ jobs: path: ${{ github.workspace }}/artifacts - name: dotnet nuget push - run: dotnet nuget push ${{ github.workspace }}/artifacts/*.nupkg --skip-duplicate -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json + run: dotnet nuget push ${{ github.workspace }}/artifacts/*.nupkg --skip-duplicate -k ${{ steps.login.outputs.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json