How to publish beta nuget packages out of AppVeyor

让人想犯罪 __ 提交于 2019-12-04 10:56:14
Feodor Fitsner

You can use PowerShell and AppVeyor API to control version number. I would try composing appveyor.yml as following:

version: 0.1.0.{build}

environment:
  packageVersion: 0.1.0

init:
- ps: $env:buildVersion = "$env:packageVersion.$env:appveyor_build_number"
- ps: $env:nugetVersion = "$env:packageVersion-beta-$env:appveyor_build_number"
- ps: Update-AppveyorBuild -Version $env:buildVersion

assembly_info:
  patch: true
  file: '**\AssemblyInfo.*'
  assembly_version: '$(buildVersion)'
  assembly_file_version: '$(buildVersion)'
  assembly_informational_version: '$(nugetVersion)'

configuration: Release

nuget:
  account_feed: true
  project_feed: true
  disable_publish_on_pr: true

before_build:
- nuget restore

build:
  verbosity: minimal

after_build:
- nuget pack Odin.nuspec

artifacts:
- path: '*.nupkg'

deploy:
- provider: NuGet
  api_key:
    secure: blahblahblah
  artifact: '*.nupkg'
  on:
    branch: master
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!