Skip to content

Merge pull request #4 from dend/december-2024-update #64

Merge pull request #4 from dend/december-2024-update

Merge pull request #4 from dend/december-2024-update #64

name: Publish In-Repo NuGet Package
on:
push:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
workflow_dispatch:
branches:
- main
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Build
working-directory: ./src/DeckSurf.SDK
run: dotnet build --configuration Release
- name: Test
working-directory: ./src/DeckSurf.SDK
run: dotnet test --configuration Release --no-build
- name: Pack
working-directory: ./src/DeckSurf.SDK
run: dotnet pack --configuration Release --no-build --output .
- name: Push
working-directory: ./src/DeckSurf.SDK
run: dotnet nuget push *.nupkg --source https://nuget.pkg.github.com/dend/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate