Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
thiomajid committed Jul 28, 2024
1 parent fc2a221 commit df08760
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/publish-to-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ on:
push:
tags:
- "v*.*.*"
pull_request:
branches:
- main

jobs:
build:
env:
BUILD_CONFIG: "Release"
SOLUTION: "EfLight.sln"
NUGET_SOURCE: https://api.nuget.org/v3/index.json
GITHUB_SOURCE: https://nuget.pkg.github.com/thiomajid/index.json
runs-on: ubuntu-latest
steps:
- name: Checkout repository
Expand Down Expand Up @@ -39,9 +38,13 @@ jobs:
dotnet pack --no-restore --no-build --configuration ${{ env.BUILD_CONFIG }}
-p:PackageVersion=${{ steps.set_version.outputs.VERSION }} --output .
- name: Publish
- name: Publish to GitHub Packages
if: startsWith(github.ref, 'refs/tags/')
run: >
dotnet nuget push *.nupkg
-s https://nuget.pkg.github.com/thiomajid/index.json
-k ${{ secrets.NUGET_API_KEY }}
-s ${{ env.GITHUB_SOURCE }}
-k ${{ secrets.GH_NUGET_TOKEN }}
- name: Publish to Nuget
if: startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source ${{ env.NUGET_SOURCE }}

0 comments on commit df08760

Please sign in to comment.