Skip to content

Commit

Permalink
chore: only main branch can publish official release
Browse files Browse the repository at this point in the history
  • Loading branch information
hcoona committed Sep 26, 2022
1 parent f952b55 commit 5e03769
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .azure-pipelines/Clocks.Net/buddy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ variables:
NUGET_PACKAGES: $(Pipeline.Workspace)/.nuget/packages

steps:
- script: exit 1
displayName: Check if is main branch
condition: ne(variables['Build.SourceBranch'], 'refs/heads/main')

- template: /.azure-pipelines/common/build.yml@self
parameters:
isOfficial: 'false'
Expand Down
4 changes: 2 additions & 2 deletions .azure-pipelines/common/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ steps:
- script: |
git config user.name "Azure DevOps Build Bot"
git config user.email "[email protected]"
git tag -a "${{ parameters.tagPrefix }}/$(NBGV_CloudBuildNumber)" -m "Created by Azure DevOps Build Pipeline"
git push origin "${{ parameters.tagPrefix }}/$(NBGV_CloudBuildNumber)"
git tag -a "${{ parameters.tagPrefix }}/$(NBGV_SemVer2)" -m "Created by Azure DevOps Build Pipeline"
git push origin "${{ parameters.tagPrefix }}/$(NBGV_SemVer2)"
displayName: 'Create git tag'
- task: GitHubRelease@0
Expand Down
4 changes: 3 additions & 1 deletion version.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"nugetPackageVersion": {
"semVer": 2
},
"publicReleaseRefSpec": [],
"publicReleaseRefSpec": [
"^refs/heads/main$"
],
"cloudBuild": {
"buildNumber": {
"enabled": false
Expand Down

0 comments on commit 5e03769

Please sign in to comment.