Update main.yml #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |