2024-03-20 21:57:57 +00:00
|
|
|
name: dotnet publish
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
tags: [ '[0-9]+.[0-9]+.[0-9]+' ]
|
|
|
|
branches: [ 'main', 'develop' ]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
package:
|
|
|
|
runs-on: debian-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
dotnet-version: [ '8.0' ]
|
|
|
|
container: mcr.microsoft.com/dotnet/sdk:${{ matrix.dotnet-version }}
|
|
|
|
steps:
|
|
|
|
- uses: https://git.geekeey.de/actions/checkout@1
|
|
|
|
- name: NuGet login
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
dotnet nuget update source geekeey --store-password-in-clear-text \
|
|
|
|
--username "${{ github.actor }}" --password "${{ github.token }}"
|
2024-03-24 08:22:42 +00:00
|
|
|
cat ~/.nuget/NuGet/NuGet.Config
|
2024-03-20 21:57:57 +00:00
|
|
|
- name: .NET pack
|
|
|
|
shell: bash
|
|
|
|
run: |
|
2024-03-24 08:22:42 +00:00
|
|
|
dotnet pack
|
2024-03-20 21:57:57 +00:00
|
|
|
- name: .NET test
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
dotnet test
|
|
|
|
- name: NuGet publish
|
|
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
dotnet nuget push artifacts/package/release/shipping/*.nupkg
|