Skip to content

8.2.2

8.2.2 #15

Workflow file for this run

name: Publish
on:
release:
types: [released]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Set version
run: |
sed -i -e "s/>0.0.0</>${{ steps.previoustag.outputs.tag }}</" ./GettyImages.Api/GettyImages.Api.csproj
cat ./GettyImages.Api/GettyImages.Api.csproj
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --configuration Release --no-build --no-restore --verbosity normal -f net6 ./UnitTests/UnitTests.csproj
- uses: actions/upload-artifact@v4
with:
name: artifacts
path: ./GettyImages.Api/bin/Release
publish:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- uses: actions/download-artifact@v4
with:
name: artifacts
path: ./artifacts
- name: 'Get Previous tag'
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
- name: Publish Package to Nuget
run: dotnet nuget push -s https://nuget.org -k "${{secrets.NUGET_PROD_KEY}}" "./artifacts/GettyImages.Api.${{ steps.previoustag.outputs.tag }}.nupkg"