Skip to content

Commit

Permalink
refactor(repo): comment out deploy step and test release step in depl…
Browse files Browse the repository at this point in the history
…oy_to_nuget action
  • Loading branch information
AJCJ1 committed Jan 21, 2025
1 parent 881a40c commit e5f4b1f
Showing 1 changed file with 37 additions and 12 deletions.
49 changes: 37 additions & 12 deletions .github/workflows/deploy_to_nuget.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Deploy to NuGet

on:
workflow_dispatch:
push:
tags: ["*"]
branches:
- master
- iss-1
pull_request:
types: [ closed ]

jobs:
deploy:
name: Deploy to NuGet
release:
if: github.event.pull_request.merged == true
name: Release Using Release Please
runs-on: ubuntu-latest
strategy:
matrix:
Expand All @@ -28,14 +34,33 @@ jobs:
- name: Restore dependencies
run: dotnet restore ./UrlboxSDK

# Build the project
- name: Build the project
run: dotnet build ./UrlboxSDK --configuration Release --no-restore
# Run tests
- name: Run tests
run: dotnet test --no-restore

# https://github.com/googleapis/release-please/blob/72b0ab360c3d6635397e8b02f4d3f9f53932e23c/docs/customizing.md
- name: Create Release
uses: google-github-actions/release-please-action@v4
with:
release-type: simple
# deploy:
# needs: release
# if: ${{ needs.release.outputs.release_created == true }}
# name: Deploy to NuGet
# runs-on: ubuntu-latest
# strategy:
# matrix:
# dotnet-version: [6.0]
# steps:
# # Build the project
# - name: Build the project
# run: dotnet build ./UrlboxSDK --configuration Release --no-restore

# # Pack the NuGet package somewhere unique
# - name: Pack NuGet package
# run: dotnet pack --configuration Release --no-build --output ./package

# Pack the NuGet package somewhere unique
- name: Pack NuGet package
run: dotnet pack --configuration Release --no-build --output ./package
# # Push the NuGet package to NuGet.org
# - name: Publish to NuGet
# run: dotnet nuget push "./package/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

# Push the NuGet package to NuGet.org
- name: Publish to NuGet
run: dotnet nuget push "./package/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

0 comments on commit e5f4b1f

Please sign in to comment.