diff --git a/.github/workflows/publish-all.yml b/.github/workflows/publish-all.yml index 1bf42ed..8b94072 100644 --- a/.github/workflows/publish-all.yml +++ b/.github/workflows/publish-all.yml @@ -53,11 +53,7 @@ jobs: - name: ๐Ÿงช Run Tests run: | echo "๐Ÿงช Running tests before publish..." - dotnet test QRCoder.Core.Tests/ \ - --configuration ${{ env.BUILD_CONFIG }} \ - --logger "trx;LogFileName=test-results.trx" \ - --results-directory TestResults \ - --verbosity normal + dotnet test QRCoder.Core.Tests/ --configuration ${{ env.BUILD_CONFIG }} --logger "trx;LogFileName=test-results.trx" --results-directory TestResults --verbosity normal - name: ๏ฟฝ Check CI/CD Status run: | @@ -101,43 +97,27 @@ jobs: - name: ๐Ÿ“ฆ Pack NuGet run: | - if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then - VERSION="${{ github.event.inputs.version }}" + if ("${{ github.event_name }}" -eq "workflow_dispatch") { + $VERSION="${{ github.event.inputs.version }}" echo "Building version $VERSION from workflow_dispatch" - dotnet pack QRCoder.Core/QRCoder.Core.csproj \ - --configuration ${{ env.BUILD_CONFIG }} \ - --no-build \ - --output ./packages \ - -p:Version=$VERSION \ - -p:PackageReleaseNotes="Release version $VERSION" - else + dotnet pack QRCoder.Core/QRCoder.Core.csproj --configuration ${{ env.BUILD_CONFIG }} --no-build --output ./packages -p:Version=$VERSION -p:PackageReleaseNotes="Release version $VERSION" + } else { # Extract version from tag - VERSION=$(echo ${{ github.ref_name }} | sed 's/^v//') + $VERSION="${{ github.ref_name }}" -replace "^v", "" echo "Building version $VERSION from tag" - dotnet pack QRCoder.Core/QRCoder.Core.csproj \ - --configuration ${{ env.BUILD_CONFIG }} \ - --no-build \ - --output ./packages \ - -p:Version=$VERSION \ - -p:PackageReleaseNotes="Release version $VERSION" - fi + dotnet pack QRCoder.Core/QRCoder.Core.csproj --configuration ${{ env.BUILD_CONFIG }} --no-build --output ./packages -p:Version=$VERSION -p:PackageReleaseNotes="Release version $VERSION" + } - name: ๐Ÿ“ฆ Publish to GitHub Packages run: | echo "๐Ÿ“ฆ Publishing to GitHub Packages..." - dotnet nuget push ./packages/*.nupkg \ - --source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' \ - --api-key ${{ secrets.GITHUB_TOKEN }} \ - --skip-duplicate + dotnet nuget push ./packages/*.nupkg --source 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json' --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate - name: ๐Ÿ“ฆ Publish to NuGet.org if: ${{ github.event.inputs.publish_nuget != 'false' }} run: | echo "๐Ÿ“ฆ Publishing to NuGet.org..." - dotnet nuget push ./packages/*.nupkg \ - --source 'https://api.nuget.org/v3/index.json' \ - --api-key ${{ secrets.NUGET_API_KEY }} \ - --skip-duplicate + dotnet nuget push ./packages/*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate - name: โœ… NuGet Summary run: | diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7ffe03b --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "dotnet.defaultSolution": "QRCoder.Core.sln" +} \ No newline at end of file