Skip to content

Commit

Permalink
Merge branch 'feature/cli' of github.com-aefinder:AeFinderProject/aef…
Browse files Browse the repository at this point in the history
…inder-cli into feature/cli
  • Loading branch information
sinclair-aefinder committed Aug 2, 2024
2 parents 35fec97 + f66b609 commit 7d773d8
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 3 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish NuGet Package

on:
push:
tags:
- "v*.*.*"

jobs:
publish:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
run: dotnet restore

- name: Get the version from git tags
id: get_version
run: |
TAG=$(git describe --tags --abbrev=0)
VERSION=${TAG#v}
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build the project
run: dotnet build --configuration Release --no-restore

- name: Pack the NuGet package
run: dotnet pack --configuration Release --no-build --output ./nupkg -p:PackageVersion=${{ env.VERSION }}

- name: Publish the NuGet package
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./nupkg/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json
6 changes: 3 additions & 3 deletions .github/workflows/sonarqube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ jobs:
run: echo "$HOME/.dotnet/tools" >> $GITHUB_PATH
- name: Begin SonarQube analysis
run: |
./.sonar/scanner/dotnet-sonarscanner begin /k:"aefinder" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
dotnet build AeFinder.sln
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
./.sonar/scanner/dotnet-sonarscanner begin /k:"aefinder-cli" /d:sonar.host.url="${{ secrets.SONAR_HOST_URL }}" /d:sonar.token="${{ secrets.SONAR_TOKEN }}"
dotnet build AeFinder.Cli.sln
./.sonar/scanner/dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"

0 comments on commit 7d773d8

Please sign in to comment.