Skip to content

Commit cc33b0b

Browse files
committed
fix: versioning
1 parent e89c50b commit cc33b0b

File tree

2 files changed

+34
-9
lines changed

2 files changed

+34
-9
lines changed

appveyor.yml

+33-8
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,37 @@ deploy:
6060
branch:
6161
- /preview\/*/
6262
CI_WINDOWS: true
63-
- provider: GitHub
64-
auth_token: $(GH_TOKEN)
65-
draft: true
66-
prerelease: false
67-
release: $(Version)
68-
on:
69-
branch:
63+
for:
64+
-
65+
branches:
66+
only:
67+
- master
68+
on_success:
69+
- cmd: git config --global credential.helper store
70+
- ps: if ($isWindows) { Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GH_TOKEN):[email protected]`n" }
71+
- cmd: IF EXIST coverage\docs ( git config --global user.email "[email protected]" )
72+
- cmd: IF EXIST coverage\docs ( git config --global user.name "Olivier Lefebvre" )
73+
- cmd: IF EXIST coverage\docs ( git stash )
74+
- cmd: IF EXIST coverage\docs ( git checkout gh-pages )
75+
- cmd: IF EXIST latest ( rmdir /S /Q latest )
76+
- cmd: IF EXIST coverage\docs ( move coverage\docs latest )
77+
- cmd: IF EXIST latest ( git add latest )
78+
- cmd: IF EXIST latest ( git commit latest -m "Appveyor build succed %APPVEYOR_BUILD_VERSION%" )
79+
- cmd: IF EXIST latest ( git push )
80+
-
81+
branches:
82+
only:
7083
- /release\/*/
71-
CI_WINDOWS: true
84+
on_success:
85+
- cmd: semantic-release -b %APPVEYOR_REPO_BRANCH%
86+
- cmd: git config --global credential.helper store
87+
- ps: if ($isWindows) { Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GH_TOKEN):[email protected]`n" }
88+
- cmd: git config --global user.email "[email protected]"
89+
- cmd: git config --global user.name "Olivier Lefebvre"
90+
- cmd: git checkout gh-pages
91+
- cmd: git stash
92+
- cmd: mkdir %NextVersion%
93+
- cmd: move coverage\docs %NextVersion%
94+
- cmd: git add %NextVersion%
95+
- cmd: git commit %NextVersion% -m "Appveyor build succed %APPVEYOR_BUILD_VERSION%"
96+
- cmd: git push

publish.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Get-ChildItem -Path src -rec `
33
| Where-Object { $_.Name -like "*.csproj"
44
} `
55
| ForEach-Object {
6-
dotnet msbuild $_.FullName -t:Build -p:Configuration=Release -p:OutputPath=..\..\artifacts\build -p:GeneratePackageOnBuild=true -p:Version=$env:APPVEYOR_BUILD_VERSION -p:FileVersion=$fileversion -p:FileVersion=$fileversion
6+
dotnet msbuild $_.FullName -t:Build -p:Configuration=Release -p:OutputPath=..\..\artifacts\build -p:GeneratePackageOnBuild=true -p:Version=$env:SemVer -p:FileVersion=$fileversion -p:FileVersion=$fileversion
77
if ($LASTEXITCODE -ne 0) {
88
throw "build failed" + $d.FullName
99
}

0 commit comments

Comments
 (0)