Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

fix main branch ref condition #125

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:

- name: Display GitVersion outputs (step output)
run: |
echo "Branch: ${{ github.ref }}"
echo "Major: ${{ steps.gitversion.outputs.major }}"
echo "Minor: ${{ steps.gitversion.outputs.minor }}"
echo "Patch: ${{ steps.gitversion.outputs.patch }}"
Expand Down Expand Up @@ -75,9 +76,9 @@ jobs:
run: dotnet pack --no-build ./src/Nox.Types --configuration Release -o ./artifacts

- name: Publish Nox.Lib
if: github.ref == 'refs/heads/main'
if: contains('refs/heads/main',github.ref)
run: dotnet nuget push ./artifacts/Nox.Types.*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

- name: Publish Nox.Lib Warning
if: github.ref != 'refs/heads/main'
run: echo "Skipping publishing, not in main branch"
if: contains('refs/heads/main',github.ref) == false
run: echo "Skipping publishing, not in main branch"