Cleanthat #139
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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
concurrency: | |
group: CI-Build | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the repository being compiled | |
uses: actions/checkout@v3 | |
with: | |
path: Repo | |
- name: Checkout the Packages repository alongside the one being compiled | |
uses: actions/checkout@v3 | |
with: | |
repository: dgmjr-io/Packages | |
path: Packages | |
- name: Run setup-dgmjrsdk | |
uses: dgmjr-actions/setup-dgmjrsdk@main | |
with: | |
git-token: ${{ secrets.GITHUB_TOKEN }} | |
environment: Release | |
git-nuget-endpoint: ${{ vars.GIT_NUGET_ENDPOINT }} | |
private-nuget-endpoint: ${{ vars.PROGET_ENDPOINT_URL }} | |
private-nuget-api-key: ${{ secrets.PROGET_API_KEY }} | |
- name: Pack | |
run: dotnet build Repo/src/DgmjrSdk.nuproj -c:Release | |
- name: Upload the NuGet Package | |
uses: actions/[email protected] | |
with: | |
# Artifact name | |
name: DgmjrSdk-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 }} | |
environment: Release | |
git-nuget-endpoint: ${{ vars.GIT_NUGET_ENDPOINT }} | |
private-nuget-endpoint: ${{ vars.PROGET_ENDPOINT_URL }} | |
private-nuget-api-key: ${{ secrets.PROGET_API_KEY }} | |
repo: dgmjr-io/DgmjrSdk | |
push-github: true | |
push-dgmjr-io: false | |
push-nuget: false |