Skip to content

Fixed project path

Fixed project path #14

Workflow file for this run

name: "Build and push to NuGet"
on:
push:
tags:
- 'v*'
env:
PROJECT_PATH: 'CLI/CLI.fsproj'
PACKAGE_OUTPUT_DIRECTORY: ${{ github.workspace }}/output
NUGET_SOURCE_URL: 'https://api.nuget.org/v3/index.json'
jobs:
release:
name: 'Release'
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout'
uses: actions/checkout@v2
- name: 'Restore packages'
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: 'Build project'
run: dotnet build ${{ env.PROJECT_PATH }} --no-restore -c Release
- name: 'Get Version'
id: version
uses: battila7/get-version-action@v2
- name: 'Pack project'
run: dotnet pack ${{ env.PROJECT_PATH }} --no-restore --no-build --include-symbols -c Release -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.PACKAGE_OUTPUT_DIRECTORY }}
- name: 'Push package'
run: dotnet nuget push ${{ env.PACKAGE_OUTPUT_DIRECTORY }}\*.nupkg -k ${{ secrets.NUGET_AUTH_TOKEN }} -s ${{ env.NUGET_SOURCE_URL }} --skip-duplicate
- name: 'Create release'
uses: actions/create-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ github.token }}
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version-without-v }}
tag_name: ${{ github.ref }}