Maybe fix NuGet

This commit is contained in:
J. Fronny 2020-03-20 16:14:42 +01:00 committed by GitHub
parent 88f73c1e10
commit 456b73633f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 22 deletions

View File

@ -68,25 +68,17 @@ jobs:
asset_path: ./app.xml
asset_name: app.xml
asset_content_type: text/xml
- name: Publish W32 to nuget
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: W32/W32.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
VERSION_STATIC: ${{ steps.base_init.outputs.vers }}
TAG_COMMIT: false # Flag to enable / disalge git tagging
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
PACKAGE_NAME: Functions.W32
- name: Publish Misc to nuget
uses: rohith/publish-nuget@v2
with:
PROJECT_FILE_PATH: Misc/Misc.csproj # Relative to repository root
# VERSION_FILE_PATH: Directory.Build.props # Filepath with version info, relative to repository root. Defaults to project file
# VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group
VERSION_STATIC: ${{ steps.base_init.outputs.vers }}
TAG_COMMIT: false # Flag to enable / disalge git tagging
# TAG_FORMAT: v* # Format of the git tag, [*] gets replaced with version
NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key
PACKAGE_NAME: Functions.Misc
- name: Publish nugets
run: |
$tmp = "${{ steps.base_init.outputs.vers }}"
$tmp1 = $tmp.split('.')[2]
$tmp2 = $tmp.split('.')[3]
$suffix = "$tmp1.$tmp2"
cd Misc
dotnet pack --version-suffix "$suffix" -c Release -o build.nupkg
dotnet nuget push build.nupkg ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json
cd ..
cd W32
dotnet pack --version-suffix "$suffix" -c Release -o build.nupkg
dotnet nuget push build.nupkg ${{secrets.NUGET_API_KEY}} -Source https://api.nuget.org/v3/index.json
cd ..