Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PullRequest-CI.yml #2

Merged
merged 1 commit into from
Nov 6, 2024
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
63 changes: 12 additions & 51 deletions .github/workflows/PullRequest-CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,62 +99,23 @@ jobs:
run: dotnet tool install gpr --global

- name: Step-03 Publish to Github Packages
run: find -name "*.nupkg" -print -exec gpr push -k ${{env.github-token}} {} \;

- name: Step-03 Release to Nuget Org
if: ${{ startsWith(github.head_ref, 'release/')}}
run: dotnet nuget push ${{env.working-directory}}/src/ApiAggregator/bin/Release/*.nupkg --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json

run: find -name "*.nupkg" -print -exec gpr push -k ${{env.github-token}} {} \;

Release:
name: Release to Nuget
needs: [Package]
if: ${{ startsWith(github.head_ref, 'release/')}}
runs-on: ubuntu-latest
env:
nuget-token: '${{ secrets.NUGET_API_KEY }}'
working-directory: /home/runner/work/ApiAggregator/ApiAggregator
steps:
- uses: actions/checkout@v2

# - name: Setup dotnet
# uses: actions/setup-dotnet@v1
# with:
# dotnet-version: '6.0.x'

# Publish
- name: publish ApiAggregator package
id: publish_nuget
uses: Rebel028/publish-nuget@v2.8.0
- name: Step-01 Retrieve Build Artifacts
uses: actions/download-artifact@v3
with:
# Filepath of the project to be packaged, relative to root of repository
PROJECT_FILE_PATH: ApiAggregator/ApiAggregator.csproj

# NuGet package id, used for version detection & defaults to project name
PACKAGE_NAME: ApiAggregator

# Filepath with version info, relative to root of repository & defaults to PROJECT_FILE_PATH
# VERSION_FILE_PATH: Directory.Build.props

# Regex pattern to extract version info in a capturing group
# VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$

# Useful with external providers like Nerdbank.GitVersioning, ignores VERSION_FILE_PATH & VERSION_REGEX
# VERSION_STATIC: 1.0.0

# Flag to toggle git tagging, enabled by default
# TAG_COMMIT: true

# Format of the git tag, [*] gets replaced with actual version
# TAG_FORMAT: v*

# API key to authenticate with NuGet server, or a token, issued for GITHUB_USER if you use GPR
# NUGET_KEY: ${{secrets.NUGET_API_KEY}}

# NuGet server uri hosting the packages, defaults to https://api.nuget.org
# NUGET_SOURCE: https://api.nuget.org
name: build-artifact
path: ${{env.working-directory}}
- name: Step-03 Release to Nuget Org
if: ${{ startsWith(github.head_ref, 'release/')}}
run: dotnet nuget push ${{env.working-directory}}/src/ApiAggregator/bin/Release/*.nupkg --skip-duplicate --api-key ${{ env.nuget-token }} --source https://api.nuget.org/v3/index.json

# Flag to toggle pushing symbols along with nuget package to the server, disabled by default
# INCLUDE_SYMBOLS: false

# Flag to throw an error when trying to publish an existing version of a package
# THOW_ERROR_IF_VERSION_EXISTS: false

# Flag to add the `--no-build` option to the `dotnet pack` command. Enabled by default.
# PACK_NO_BUILD: true
Loading