Updated .NET Github Actions

- Use .NET setup v3
- Removed staging action
- Cache packages
This commit is contained in:
Tony Bark 2023-08-12 17:11:59 -04:00
parent 6bc99bb7cc
commit a228081732
3 changed files with 6 additions and 26 deletions

View file

@ -10,6 +10,8 @@ jobs:
timeout-minutes: 15
continue-on-error: true
runs-on: ${{ matrix.platforms }}
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
strategy:
matrix:
dotnet: ["6.0.x"]
@ -17,7 +19,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Install dependencies

View file

@ -7,10 +7,12 @@ jobs:
publish:
name: Package Release
runs-on: ubuntu-latest
env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
- name: Install dependencies

View file

@ -1,24 +0,0 @@
name: Publish Testing Package
on:
push:
branches:
- "staging/**"
jobs:
publish:
name: Package Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Install dependencies
run: dotnet restore
- name: Package
run: dotnet pack --no-restore -o .
- name: Publish to Nuget
env:
NUGET_KEY: ${{ secrets.DEPLOY_TEST_KEY }}
NUGET_API: https://apiint.nugettest.org/v3/index.json
run: dotnet nuget push CSTNet.*.nupkg --api-key $NUGET_KEY --source $NUGET_API