diff --git a/.gitea/workflows/nuget.yaml b/.gitea/workflows/nuget.yaml index 189cb78..3cdda69 100644 --- a/.gitea/workflows/nuget.yaml +++ b/.gitea/workflows/nuget.yaml @@ -1,20 +1,24 @@ name: dotnet-publish-nuget on: [push] + +env: + DOTNET_VERSION: 8.x + DOTNET_NUGET_SOURCE_URL: https://git.mworkspace.cn/api/packages/GiteaActionsSample/nuget/index.json jobs: Pack-And-Publish: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v3 + - name: List files in the repos + run: ls ${{ gitea.workspace }} && ls $GITEA_WORKSPACE - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: - dotnet-version: 8.x + dotnet-version: ${{ env.DOTNET_VERSION }} cache: true - source-url: https://git.mworkspace.cn/api/packages/GiteaActionsSample/nuget/index.json + source-url: ${{ env.DOTNET_NUGET_SOURCE_URL }} env: NUGET_AUTH_TOKEN: ${{secrets.NUGET_APIKEY}} - - name: List files in the repos - uses: actions/checkout@v3 - run: ls ${{ gitea.workspace }} && ls $GITEA_WORKSPACE - name: Install dependencies run: dotnet restore - name: Build