Skip to content

Commit

Permalink
Fixed publishing. (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
Utar94 authored Dec 23, 2024
1 parent a4e4ab1 commit dba7810
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 22 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/backend-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ on:
push:
branches:
- main
- v5
paths:
- 'backend/**'
pull_request:
branches:
- main
- v5
paths:
- 'backend/**'
workflow_dispatch:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
name: Publish Docker Image to Docker Hub & NuGet Packages

name: Publish Docker Image to Docker Hub
on:
release:
types: [published]
workflow_dispatch:

jobs:
publish:
name: Publish Docker Image to Docker Hub & NuGet Packages
name: Publish Docker Image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup .NET9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x

- name: Restore dependencies
run: dotnet restore

- name: Build Solution
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --filter Category=Unit

- name: Build Portal Frontend
run: |
cd ./frontend
Expand Down Expand Up @@ -54,6 +39,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Push NuGet
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json
31 changes: 31 additions & 0 deletions .github/workflows/publish-nuget.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish NuGet Packages

on:
release:
types: [published]
workflow_dispatch:

jobs:
publish:
name: Publish NuGet Packages
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup .NET9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x

- name: Restore dependencies
run: dotnet restore

- name: Build Solution
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test --configuration Release --no-build --verbosity normal --filter Category=Unit

- name: Push NuGet
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate --source https://api.nuget.org/v3/index.json

0 comments on commit dba7810

Please sign in to comment.