Skip to content

Commit

Permalink
update github action
Browse files Browse the repository at this point in the history
  • Loading branch information
JosepFe committed Dec 10, 2024
1 parent 0b1946c commit 9fa3cd0
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/nuget-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
PATCH=$(echo $LATEST_VERSION | cut -d. -f3 | cut -d- -f1) # Removes preview suffix if present
# If the latest version has a preview label, extract the preview number
PREVIEW_SUFFIX=$(echo $LATEST_VERSION | grep -oP '(?<=-preview)(\d+)' || echo "0")
PREVIEW_SUFFIX=$(echo $LATEST_VERSION | grep -oP '(?<=-preview.)(\d+)' || echo "0")
# Increment version based on user input
if [ "$VERSION_TYPE" == "major" ]; then
Expand All @@ -83,16 +83,16 @@ jobs:
echo "New version: $NEW_VERSION"
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
# - name: Restore dependencies
# run: dotnet restore source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj
- name: Restore dependencies
run: dotnet restore source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj

# - name: Build project
# run: dotnet build source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj --configuration Release --no-restore
- name: Build project
run: dotnet build source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj --configuration Release --no-restore

# - name: Pack NuGet package
# run: dotnet pack source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj --configuration Release --no-build --output ./nuget-packages /p:PackageVersion=${{ env.NEW_VERSION }}
- name: Pack NuGet package
run: dotnet pack source/Modules/${{ github.event.inputs.project }}/${{ github.event.inputs.project }}.csproj --configuration Release --no-build --output ./nuget-packages /p:PackageVersion=${{ env.NEW_VERSION }}

# - name: Push NuGet package to GitHub Packages
# run: |
# project_dir="/home/runner/work/devon4net/devon4net/nuget-packages"
# dotnet nuget push "$project_dir/*.nupkg" --source https://nuget.pkg.github.com/JosepFe/index.json --api-key ${{ secrets.TOKEN_GITHUB }}
- name: Push NuGet package to GitHub Packages
run: |
project_dir="/home/runner/work/devon4net/devon4net/nuget-packages"
dotnet nuget push "$project_dir/*.nupkg" --source https://nuget.pkg.github.com/JosepFe/index.json --api-key ${{ secrets.TOKEN_GITHUB }}

0 comments on commit 9fa3cd0

Please sign in to comment.