Skip to content

Update main.yml

Update main.yml #21

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: CI Build
concurrency:
group: CI-build
cancel-in-progress: true
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Build with DGMJR-IO SDK
uses: dgmjr-actions/build-using-dgmjrsdk@main
with:
git-token: ${{ secrets.GITHUB_TOKEN }}
repo: dgmjr-io/Abstractions
project-file-path: Dgmjr.Abstractions.csproj
push-github: true
environment: Release
private-nuget-api-key: ${{ secrets.FEEDZ_IO_TOKEN }}
private-nuget-endpoint: ${{ vars.FEEDZ_IO_ENDPOINT_URL }}
- name: Upload the NuGet Package
uses: actions/upload-artifact@v3.1.3
with:
# Artifact name
name: NuGetPackage
# A file, directory or wildcard pattern that describes what to upload
path: "**/*.nupkg"
# The desired behavior if no files are found using the provided path.
if-no-files-found: error
retention-days: 1
push-nuget:
needs: build
runs-on: ubuntu-latest
steps:
- name: Run nuget-push
uses: dgmjr-actions/nuget-push@main
with:
git-token: ${{ secrets.GITHUB_TOKEN }}
project-file-path: Dgmjr.Abstractions.csproj
environment: Release
git-nuget-endpoint: ${{ vars.GIT_NUGET_ENDPOINT }}
private-nuget-endpoint: ${{ vars.FEEDZ_IO_ENDPOINT_URL }}
private-nuget-api-key: ${{ secrets.FEEDZ_IO_TOKEN }}
repo: dgmjr-io/DgmjrSdk
push-github: true
push-private: true
push-nuget: false