fix source to push packages #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: No Test Deploy Nuget for Windows | |
on: | |
push: | |
tags: | |
- 'v*' | |
env: | |
PATH_TO_PROJECTS: ${{ github.workspace }}\src | |
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}\output\ | |
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json' | |
GITHUB_PACKAGES_URL: 'https://nuget.pkg.github.com/asv-soft/index.json' | |
jobs: | |
deploy: | |
name: 'Deploy' | |
runs-on: windows-latest | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
- name: Setup .Net | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: | | |
8.x.x | |
7.x.x | |
- name: Getting version | |
id: version | |
uses: battila7/get-version-action@v2 | |
- name: Checking version | |
run: echo ${{ steps.version.outputs.version-without-v }} | |
- name: Setting the project version | |
run: | | |
dotnet tool install -g dotnet-setversion | |
setversion ${{ steps.version.outputs.version-without-v }} ${{ env.PATH_TO_PROJECTS }}\Asv.Avalonia.Toolkit\Asv.Avalonia.Toolkit.csproj | |
- name: Restoring workloads | |
run: | | |
cd src | |
dotnet workload restore | |
dotnet workload restore ${{ env.PATH_TO_PROJECTS }}\Asv.Avalonia.ToolkitGallery.Android\Asv.Avalonia.ToolkitGallery.Android.csproj | |
dotnet workload restore ${{ env.PATH_TO_PROJECTS }}\Asv.Avalonia.ToolkitGallery.iOS\Asv.Avalonia.ToolkitGallery.iOS.csproj | |
- name: Restoring dependencies | |
run: | | |
cd src | |
dotnet restore | |
- name: Building projects | |
run: | | |
cd src | |
dotnet build -c Release | |
- name: Packing projects to Nuget | |
run: | | |
cd src | |
dotnet pack -c Release -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }} | |
- name: Pushing packages to Nuget | |
run: | | |
cd src | |
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}Asv.Avalonia.Toolkit.${{ steps.version.outputs.version-without-v }}.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} --skip-duplicate --source https://api.nuget.org/v3/index.json | |
- name: Pushing packages to Github | |
run: | | |
cd src | |
dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}Asv.Avalonia.Toolkit.${{ steps.version.outputs.version-without-v }}.nupkg -k ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }} --skip-duplicate --source https://nuget.pkg.github.com/asv-soft/index.json |