Skip to content

add nuget config

add nuget config #1

name: No Test Release Windows
on:
workflow_call:
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
- 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.Drones.Gui.Desktop\Asv.Drones.Gui.Desktop.csproj
- name: Restore workloads
run: |
cd src
dotnet workload restore
- name: Setup NuGet config
env:
NUGET_USERNAME: ${{ secrets.USER_NAME }}
NUGET_PASSWORD: ${{ secrets.GIHUB_NUGET_AUTH_TOKEN }}
- name: Building projects
run: |
cd ${{ env.PATH_TO_PROJECTS }}\Asv.Drones.Gui.Desktop
dotnet build -c Release
- name: Publish
uses: actions/upload-artifact@v3
with:
name: release-package-${{ runner.os }}-${{ inputs.build-type }}
path: |
${{ github.workspace }}/out/package/${{ inputs.preset-name }}/*.tar.*
${{ github.workspace }}/out/package/${{ inputs.preset-name }}/*.zip