diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fee603cf8..220091947 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,15 +4,19 @@ This library uses [Nerdbank.GitVersioning](https://github.com/AArnott/Nerdbank.GitVersioning) for generating stable and reproducible version numbers. -The so-called base version is manually maintained in [the version config](version.json). Every build calculates its final version number based on the base version and the number of changes that occured since the last change to the version config. +The base version is manually maintained in [the version config](version.json). Every build calculates its final version number based on the base version and the number of changes that occured since the last change to the version config. -The base version represents the _next_ version that we will released. During development it contains a prerelease suffix, like `-beta` which is appended to the generated NuGet packages. +The base version represents the MAJOR and MINOR parts of [SemVer](https://semver.org). If a PR contains breaking changes or new features the base version has to be changed accordingly. If a PR solely contains minor changes (bug fixes, code improvements) nothing needs to be done as the PATCH number will automatically increment with each commit. -Every successful commit on `master` deploys packages to `nuget.org` and a creates GitHub release. As long as we have the prelease suffix both will be marked as such. +## Branches / tags + +* `master` contains the latest sources - this is where we develop. +* `release` contains the sources for the latest version on `nuget.org` - this is where we deploy from. +* All versions on `nuget.org` have a matching GitHub release/tag ### Release workflow -1. Remove prelease suffix from `version.json`. -1. Wait for the completion of the deployment. -1. Remove the prerelease flag from the newly created GitHub release. -1. Increment the version number in `version.json` and again add the prelease suffix (usually `beta` is fine). \ No newline at end of file +1. Create a [PR from `master` to `release`](https://github.com/System-IO-Abstractions/System.IO.Abstractions/compare/release...master?expand=1) and wait for CI to finish. +1. Inspect CI run (test results, version number) +1. Merge PR and wait for deployment +1. Inspect newly created package versions on NuGet.org and newly created GitHub release diff --git a/appveyor.yml b/appveyor.yml index 3dbf40d81..6e709c648 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -4,13 +4,17 @@ image: configuration: Release +# Don't start CI for branches that already have a PR skip_branch_with_pr: true +# Don't start CI when tags are pushed skip_tags: true +# Limit CI to master/release branches (and PRs targeting them) branches: only: - master + - release environment: INHERITDOC_VERSION: 1.2.2.1 @@ -31,6 +35,7 @@ before_package: # This step replaces the inheritdoc tags in the xml documentation with documentation from mscorlib.xml - ps: '& $env:TEMP_DIR\InheritDoc.$env:INHERITDOC_VERSION\tools\InheritDoc.exe -b $env:APPVEYOR_BUILD_FOLDER -g "c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.X\mscorlib.xml" -o' +# Perform deployments only for Windows job for: - matrix: @@ -43,13 +48,13 @@ for: skip_symbols: false artifact: /.*\.nupkg/ on: - branch: master + branch: release - provider: GitHub tag: v$(appveyor_build_version) - prerelease: true + prerelease: false artifact: /.*\.nupkg/ auth_token: secure: Rrk1zp93EpCyxec/GXKnRnJjX7vU+ClNZEBnxbM+1j6l+C56qSV7B/fUrVsJuZYV on: - branch: master + branch: release diff --git a/version.json b/version.json index 10153a30b..bdad27842 100644 --- a/version.json +++ b/version.json @@ -5,7 +5,7 @@ "precision": "major" }, "publicReleaseRefSpec": [ - "^refs/heads/master$" + "^refs/heads/release$" ], "cloudBuild": { "buildNumber": { @@ -13,4 +13,4 @@ "setVersionVariables": true } } -} \ No newline at end of file +}