Skip to content
Open
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
19 changes: 3 additions & 16 deletions .github/workflows/build-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ on:
- '!**/*.md'
workflow_dispatch:
inputs:
publish-github-package:
type: boolean
description: 'Github Package push'
default: true
required: false
publish-myget-package:
type: boolean
description: 'MyGet Package push'
Expand All @@ -29,7 +24,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.x
dotnet-version: 7.x

- name: Build Reason
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
Expand Down Expand Up @@ -73,7 +68,7 @@ jobs:
done

- name: Package
if: ${{ inputs.publish-github-package || inputs.publish-myget-package}}
if: ${{ inputs.publish-myget-package }}
shell: bash
run: |
for project in $(find ./src -name "*.csproj"); do
Expand All @@ -85,20 +80,12 @@ jobs:
run: dotnet tool install gpr -g

- name: Publish CI Packages
if: ${{ inputs.publish-github-package || inputs.publish-myget-package}}
if: ${{ inputs.publish-myget-package }}
shell: bash
run: |
for package in $(find ./artifacts/packages/ -name "*.nupkg" -o -name "*.snupkg"); do
echo "$package": Pushing $package...

if [ "${{ inputs.publish-github-package }}" = "true" ]; then
# GitHub
echo "Pushing to GitHub Package Registry..."
gpr push "$package" -k ${{ secrets.GITHUB_TOKEN }} || echo "Skipping: Package push failed or already exists."
else
echo "Skipping: Pushing to GitHub Package Registry is disabled."
fi

# MyGet
if [ "${{ inputs.publish-myget-package }}" = "true" ]; then
echo "Pushing to MyGet..."
Expand Down
Loading