19 Add extension for HotChocolate #5
Workflow file for this run
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
name: Merge to Main actions | |
on: | |
pull_request: | |
branches: [ "main" ] | |
types: | |
- closed | |
jobs: | |
if_merged: | |
if: github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./DataAccess.Repository | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
# Set up local NuGet repo | |
- name: Setup GitHub NuGet | |
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/Ian-Webster/index.json" | |
# Resource NuGet dependencies | |
- name: Restore dependencies | |
run: dotnet restore | |
# Build project | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
# Publish NuGet package | |
- name: Publish DataAccess NuGet package to GitHub | |
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source "github" | |